# ElasticSearch as primary database and other solutions

**URL:** <https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021>\
**Category:** Elasticsearch\
**Created:** [September 1, 2021, 10:23am UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021 "2021-09-01T10:23:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xemyleex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xemyleex/32/56623_2.png) [@xemyleex](https://discuss.elastic.co/u/xemyleex)\
**Post date:** [September 1, 2021, 10:23am UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/1 "2021-09-01T10:23:30Z")

</div>

I am using elasticsearch as primary database. But due to the lack of the ACID properties, I want to:

- or replace it with another database with similar or better performances ( maybe postgresql or kafka/ksql ).
- or use other solution together with elasticsearch to avoid the loss of data ( due to the lack of the ACID properties ).

So what is the better solution? and how can I check what are the performance differences between ElasticSearch and the other solution?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 1, 2021, 11:38am UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/2 "2021-09-01T11:38:32Z")

</div>

The performance numbers are hard to tell without telling anything about your use-case. Also, just because of lacking ACID properties does not mean, there are no guarantees. You can do optimistic locking for example, that maybe sufficient for certain use-cases.

So maybe telling a bit more about your use-case and what features and guarantees you need in the context of your application/data will increase the likelihood of getting a useful answer.

Thank you!

---

<div class="post-metadata">

**Author:** ![xemyleex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xemyleex/32/56623_2.png) [@xemyleex](https://discuss.elastic.co/u/xemyleex)\
**Post date:** [September 1, 2021, 12:41pm UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/3 "2021-09-01T12:41:33Z")

</div>

My requirements are speed in searching, distribution, resilience and high availability.  
The lack of the ACID properties is not good in my case because there could be a loss of data.  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 1, 2021, 2:53pm UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/4 "2021-09-01T14:53:19Z")

</div>

what makes you think that dataloss can happen just because it is not ACID? Can you elaborate?

---

<div class="post-metadata">

**Author:** ![xemyleex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xemyleex/32/56623_2.png) [@xemyleex](https://discuss.elastic.co/u/xemyleex)\
**Post date:** [September 1, 2021, 2:58pm UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/5 "2021-09-01T14:58:31Z")

</div>

Some people says that there could be loss of data:

> [@Elasticsearch as a primary database](https://discuss.elastic.co/t/elasticsearch-as-a-primary-database/85733/9):
>
> Some customers use Elasticsearch as a primary datastore, some set-up comprehensive back-up solutions using features such as our Snapshot and Restore, while others use Elasticsearch in conjunction with a data storage system like Hadoop or even flat files. Elasticsearch can be used for so many different use cases which is why we have created this page to make sure you are fully informed when you are architecting your system. Basically you are aware that something can hoes wrong but we are tryin…

Other people says that it's not a good idea to use Elasticsearch as primary database in general.

Are they wrong?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 1, 2021, 10:07pm UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/6 "2021-09-01T22:07:50Z")

</div>

That topic is from 4 years ago, there's been tonnes of improvements around this area in that time. With replicas and snapshots and good planning, you will be ok.

PS - it's Elasticsearch, not ElasticSearch 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 29, 2021, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-as-primary-database-and-other-solutions/283021/7 "2021-09-29T22:08:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
