I have two Web Servers ws001 and ws002 working as load balance for
Elasticseach and I am trying to catch/count the hits for a specific page
which is something like this: mysite.com/listing/item-123/.
Using the ES I am running curl –XGET http:
//mysite.com:9200/stats/listingviews/_search?pretty Then count the hits for
a specific "_id": "hits" : { "total" : 1526, "max_score" : 1.0, "hits" : [
{ "_index" : "stats", "_type" : "listingviews", "_id" :
"IYSs1OmqSvK6gRDQr61j3w", "_score" : 1.0,
"_source":{"id":"1159","type":"listing","ua":"Mozilla/5.0 (Windows NT 6.1;
WOW64; rv:34.0) Gecko/20100101
Firefox/34.0","ip":"203.206.165.208","time":"2014-12-23 13:37:49"} }
When I test it on my dev environment (localhost) with only one node and
there is no load balance applied it works perfect, I always find this "_id"
and the count works pretty good, but on my production with load balance
activated I cannot find the results ("_id") on both servers ws001 and ws002
and it breaks my hits counting.
On my load balance servers I getting completely different results, I mean
("_id"), when I run: curl –XGET http:
//webserver1:9200/stats/listingviews/_search?pretty and curl –XGET http:
//webserver2:9200/stats/listingviews/_search?pretty. Also I already checked
the shads for each server and they are different.
At the end, the _ids found on both servers never match and definitely they
are not the same ids. I’m supposing that the replica on the load balance is
not working as replica and the ES is storing the data in both servers
separately. Even if the _ids are not on each server, the end result should
be our ability to count how many records there are (ie. where _source->id =
1159) but it seems to only get a count from ws001.
Which approach should I take to solve this issue, and be able to count my
hits on the production environment?
Thanks,
Carlos.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9f7133f7-3bbb-4b7b-b298-d4bd125baf34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.