elmahio / Elmah.Io.ElasticSearch

Elmah.Io.ElasticSearch is an Elasticsearch storage backend for ELMAH.
https://elmah.io
Apache License 2.0
23 stars 8 forks source link

Replica settings should not be set to zero #11

Closed jayhilden closed 9 years ago

jayhilden commented 9 years ago

Currently, when the Elmah index is setup in ElasticSearch the following defaults are overridden:

Replicas = 0 Shards = 1 merge.policy.merge_factor = 10 --note: this is the Elastic Default search.slowlog.threshold.fetch.warn = 1s

https://github.com/elmahio/Elmah.Io.ElasticSearch/blob/06433749c0e75757a95b56c061ab946cf3f4c14e/Elmah.Io.ElasticSearch/ElasticSearchErrorLog.cs#L122

In a production environment where there is more than 1 node setting replicas = 0 means that a copy of the data would not exist on the other nodes in the cluster. This is not ideal.

ElasticSearch support recommends leaving all of these at the default values and only tweaking them if necessary in production.

ThomasArdal commented 9 years ago

You are absolutely right. The code should use Elasticsearch defaults. The only reason for not implemented this way is, that this code is written years ago and I haven't spend time updating it. This error logger is 100 % community driven at the moment, so feel free to send a pull request :smile:

jayhilden commented 9 years ago

And by community driven do you mean driven by me? :) I'll have a pull request for you later today.

ThomasArdal commented 9 years ago

You ARE the community in this case :p What I'm saying is, that I no longer contribute to this project. I've moved all of my personal stuff to elmah.io. I still see a need for a project like this, why it's great to have people like you contributing!

jayhilden commented 9 years ago

@ThomasArdal I'm more than happy to help! I'm converting our organization from Elmah over SQL to Elmah over ES so I'll have some good feedback about what is working and what can be improved. We love the idea of having centralized logging and we love Elastic!

ThomasArdal commented 9 years ago

Sounds great!