Doubt architecture deployment with Elasticsearch?

Asked

Viewed 123 times

2

Hello,

it is normal to use Elasticsearch as a direct backend in a web application.

Security-related?

Frontend (js) -> Backend (Elasticsearch)

or

Frontend (js) -> your backend -> service (Elasticsearch)

My big concern would be on access security to Elasticsearch.

Someone already uses Elasticsearch in production this way...

Grateful

  • It is not normal to use ES as "back-end" until because it is a document indexer and not a database.

2 answers

1

Elasticsearch is a real time search engine based on Lucene, naturally distributed, scalable and Rest server. It basically uses Lucene to do data indexing and makes it scalable through index Clusterization and replication.

Elasticsearch should only be used for searching because it does not have strong referential integrity and at some point the indexes can be corrupted, main when you start to scale the nodes.

Ideally you use the following structure: Front End JS/ Back End JS/ Data Access(Some relational database or NOSQL and index what is relevant to Elasticsearch.

Using Elasticsearch is simple at first glance, but maintaining cluster stability becomes increasingly difficult as the data flow increases and you need more scale.

1

Depends a lot...

I would not recommend using Elasticsearch as a primary database, because it is a document. Once the data is there, the data is transformed and stored in the Elasticsearch cluster for analysis. But if you are building completely new systems, then you have TOTAL freedom.

I would go with the second option: Front-end -> Back-end -> DB -> ES

The ideal is for you to have your business model working normally in an SQL or noSQL database (you choose) and if you need to analyze or query data use Elasticsearch to enjoy its ease and high performance.

  • 1

    Show, Thanks, I already have a functional architecture and my main db is another, it would just be this architecture for msm query, but my concern is the safety of using only Elastic, on external access to Elastic.... Thank you very much for your reply :)

  • Cool @Sidicleif.Almeida ! I’m happy to help you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.