Shared Elasticsearch index for multiple Mastodon instances?

I have multiple Mastodon instances and a single ES node.

When I ran chewy:deploy on one instance, it created an index named statuses_1550441830498. I don’t know how the name is chosen (maybe it’s stored in the chewy_specifications index?), but when I ran chewy:deploy on a second instance, it added documents to the same index.

Is it a problem? If it is, how do I avoid it?

Yes, I think that’s a problem. Sharing ES between multiple instances hasn’t come up before, I think we are missing a namespacing option. I do not know offhand how to configure a namespace for Chewy. But I recommend temporarily either deleting the index or disabling ES in all but the one instances.

Sorry, I am wrong, we do have it. ES_PREFIX which falls back to REDIS_NAMESPACE when not set:

So are you missing a REDIS_NAMESPACE between your instances? Because that’s also a (much bigger) problem.

Thank you Eugen, the instances are on seperate servers so they have their own Redis instance.

I created this PR: Add ES_PREFIX in .env.production.sample by angristan · Pull Request #10087 · tootsuite/mastodon · GitHub