Elasticsearch-net: Add 504 to default retry status codes

Created on 26 Apr 2016  路  3Comments  路  Source: elastic/elasticsearch-net

Feature backport 2.x v5.0.0-beta1

Most helpful comment

The reason we don't simply retry on >=500 is because 500 can be used to signal valid bad states that should not be retried:

https://github.com/elastic/elasticsearch/search?p=1&q=INTERNAL_SERVER_ERROR&utf8=%E2%9C%93

Which I think is the correct status code, @elastic/es-clients do you see different HTTP status codes Elasticsearch could be returning in the previous cases, clearing the 500 range? Do we all want/need to settle on 502, 503, 504 collectively?

All 3 comments

The reason we don't simply retry on >=500 is because 500 can be used to signal valid bad states that should not be retried:

https://github.com/elastic/elasticsearch/search?p=1&q=INTERNAL_SERVER_ERROR&utf8=%E2%9C%93

Which I think is the correct status code, @elastic/es-clients do you see different HTTP status codes Elasticsearch could be returning in the previous cases, clearing the 500 range? Do we all want/need to settle on 502, 503, 504 collectively?

Do we all want/need to settle on 502, 503, 504 collectively?

+1

+1, will add it to python, do we also want to document it in ES itself for ES devs and other client authors? Where would be a good place?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mszczepaniakebsco picture mszczepaniakebsco  路  5Comments

iderbyshev picture iderbyshev  路  3Comments

mausch picture mausch  路  4Comments

hatem1975 picture hatem1975  路  3Comments

russcam picture russcam  路  3Comments