Pre and Prod instances

Hello, for a very small project, in MySQL I use just two separate DBs in the same server, like for example my-nice-project-prod and my-nice-project-pre.

What's up with ElasticSearch supporting several instances of the project in the same machine? I just want ElasticSearch as a storage of a few thousands of JSON documents. It's not a big data processing project now.

Do I have to run 2 instances listening to different ports? If under the same port... The only thing I can imagine now is like prefixing the indexes, but sound like ugly and weird. What solutions are usual to hold several project-instances under the same 9200 port?

Instead, opening new ports is like weird if I want to dynamically create project instances to make tests, other than pre and prod; like for example having: pre, prod, test1, test2, test3... till testn. It seems weird to have to "launch" a new server process for each test-instance; while playing with index names also sound weird.

What's the practice you are doing?

Elasticsearch is multi tenant so just name your indices accordingly as you would name 2 schemas in MySQL.

Thanks David.

I see there a risk of data-loss if pre-production has any bug and accidentally deletes production data.

Is there a way to set user permissions in a wildcard manner saying:

  • This user pre_user can only read and write pre_* indexes
  • this other user prod_usercan only read and write prod_*indexes,
  • none of the above can change system settings, only PUT, POST, GET on exactly those data indices.
  • this other user admin_guy will be able to configure the global settings of the nodes and so...

so the system takes care and I'm sure that it is impossible that a bug in preproduction deletes real-production data?

Using x-pack (commercial) would surely help to secure your indices.

But seriously are you using the same MySQL database in both production and preproduction?

x-pack/commercial => isn't there a user-security over indexes in the free version of x-pack?

mysql/pre/prod => For "normal" projects no, of course I place different machines for prod and pre. "normal" projects start when the owners don't mind spending $100 extra per month to have things well done for example.

Instead, for very-super-tiny-startups that need to spend as low as possible, and $50/month for a new server is critical, yes, until the startup makes about $1000 in excess per month or so.

So this question, translated to the elasticsearch thing, is needed as a "temporal" solution until the company can affort to pay "a set of servers" for prod and "another set" for pre. It's not intended to leave this as a permanent solution. I know it is ugly and dirty. It's for bootstrapping the company only.

Security is not included in the basic X-Pack license. If a hosted service however is an option, you get role-based access controls included in all Elastic Cloud plans.

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