[ 
https://issues.apache.org/jira/browse/BEAM-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198883#comment-16198883
 ] 

Etienne Chauchot commented on BEAM-3026:
----------------------------------------

Elastic project discussions tend to go toward adding this 429 retry feature to 
more high level client (like beam IO) rather than to low level client (like ES 
rest client). IMHO it also needs a bit more thinking to avoid making the load 
of ES cluster worse by retrying 
See https://github.com/elastic/elasticsearch/issues/21141

> Improve retrying in ElasticSearch client
> ----------------------------------------
>
>                 Key: BEAM-3026
>                 URL: https://issues.apache.org/jira/browse/BEAM-3026
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-extensions
>            Reporter: Tim Robertson
>            Assignee: Jean-Baptiste Onofré
>
> Currently an overloaded ES server will result in clients failing fast.
> I suggest implementing backoff pauses.  Perhaps something like this:
> {code}
>     ElasticsearchIO.ConnectionConfiguration conn = 
> ElasticsearchIO.ConnectionConfiguration
>       .create(new String[]{"http://...:9200"}, "test", "test")
>       .retryWithWaitStrategy(WaitStrategies.exponentialBackoff(1000, 
> TimeUnit.MILLISECONDS)
>       .retryWithStopStrategy(StopStrategies.stopAfterAttempt(10)
>     );
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to