the excpected behaviour is that it will try to insert the documents to
"dns1" and if it fails it will automatically change to "dns2". but, for
some reason when one of the servers is down on insertion the php client
throws an exception that it couldn't connect to host and only.
Is there any way to cause the client automatically choose an online server?
Solution: After debugging the the elasticsearch php client I found a retry
mechansim that allows the client to jump to the next server from the pool
if the previous is down. this mechanism is disabled by default
to enable this mechanism you need to initialize the Client with a parameter
called retries:
the excpected behaviour is that it will try to insert the documents to
"dns1" and if it fails it will automatically change to "dns2". but, for
some reason when one of the servers is down on insertion the php client
throws an exception that it couldn't connect to host and only.
Is there any way to cause the client automatically choose an online server?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.