I have two servers running an elasticsearch cluster as our website's search
engine. And use Elastica as our php client.
At beginning, the queries are sent directly to ES but the servers are very
unstable and the tcp connections are about 500-600, so ES can't handle them
quickly and always get timeout response (We set the timeout to 5s). So we
added 5mins cache with memcached and the situation got better. The tcp
connections are controlled around 10 (avg).
I found that if the connections over 100 then it will become very unstable.
Does this because the server can't handle too much request? Or I need to
optimize my queries? (Most queries took about 50 ms)
Here is a gist of the node stats at some