Can I set up PRODUCTION and DEV environment to utilize one/same search index


(Gaurav gupta) #1

Would this be possible to have both a PRODUCTION and DEV environment refer to the same search index? The production and dev environment are separate and not a part of same cluster and each is comprising of single node cluster only. Is it possible to point the DEV environment (having one node only) to the Production environment index location so that dev will utilize the index created by Production and vice versa.

Basically, the index are growing very very large and its surpassing the initial capacity planning, so is it possible to have both refer to same index (i.e. same location)

Thanks
Gaurav


(Magnus Bäck) #2

You want different instances of Elasticsearch to use the same physical indexes on disk? No, that's not possible.


(Gaurav gupta) #3

Is it possible if these 2 servers/instances (i.e. PROD and DEV) will not transact at the same time but if at some point of time if one ES server goes down for some reason then one should be able to use the same Indices from the another ES server/instance (i.e. DEV server).

Here, only one ES instance (PROD) is creating, updating, searching the index at one time, so lock should be acquired with that ES instance (PROD) only. In case, first ES instance i.e. PROD goes down then it should release the lock of the index and now one can start the another ES instance i.e. DEV server pointing to the same index (i.e. physically same location of index). I think the DEV server can now utilize the same index as lock is already freed by the PROD server and DEV can acquire the lock on the same index. Thoughts ?

Note: - Please let me know how locking of index work in ES. Is there a web resource which I can refer to understand locking mechanism of indexes in ES.

Thanks
Gaurav


(Magnus Bäck) #4

So basically two instances that take turns in "owning" the on-disk files? That might work, but I'd use ES's built-in methods for creating a resilient and reliable service instead of spending time on that.


(Gaurav gupta) #5

So, you are suggesting to use the clustered/distributed setup of ES having multiple nodes as a part of same cluster for failover, reliable and resilient service, instead having two separate environments for failover mechanism in active/passive mode.


(Magnus Bäck) #6

Yes, exactly.


(system) #7