Oipo opened a new pull request #274:
URL: https://github.com/apache/celix/pull/274


   In the current setup, when connecting tens to hundreds of 
publishers/subscribers, the TTL refresh loop causes a storm of etcd requests. 
Given that each curl_easy handle got created and destroyed, no re-use of open 
connections is possible, leading the code to exceed the sysctl defaults of 470 
connection/s. The error curl then gives in this scenario is that it is unable 
to connect to the address.
   
   This PR stores the created curl_easy handle in the etcdlib struct and 
surrounds it by mutexes to prevent data races. This might cause issues if 
network latency exceeds give or take 50ms, as each etcdlib instance cannot do 
multiple requests simultaneously anymore. I think this would only cause issues 
if the etcd server given is outside of the same datacentre used by the program.
   
   Given the option between exceeding 470 new connections per second, or 
slightly lowered theoretical throughput, I would go for the latter option.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to