• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / #783
92%

Build:
DEFAULT BRANCH: main
Ran 14 Apr 2024 05:01PM UTC
Jobs 1
Files 150
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Apr 2024 04:56PM UTC coverage: 80.632% (+0.03%) from 80.606%
#783

push

travis-ci

web-flow
Add server failover retry behavior, where failed servers are retried with small probability after a minimum delay (#731)

**Summary**

By default c-ares will select the server with the least number of
consecutive failures when sending a query. However, this means that if a
server temporarily goes down and hits failures (e.g. a transient network
issue), then that server will never be retried until all other servers
hit the same number of failures.

This is an issue if the failed server is preferred to other servers in
the list. For example if a primary server and a backup server are
configured.

This PR adds new server failover retry behavior, where failed servers
are retried with small probability after a minimum delay has passed. The
probability and minimum delay are configurable via the
`ARES_OPT_SERVER_FAILOVER` option. By default c-ares will use a
probability of 10% and a minimum delay of 5 seconds.

In addition, this PR includes a small change to always close out
connections to servers which have hit failures, even with
`ARES_FLAG_STAYOPEN`. It's possible that resetting the connection can
resolve some server issues (e.g. by resetting the source port).

**Testing**

A new set of regression tests have been added to test the new server
failover retry behavior.

Fixes Issue: #717 
Fix By: Oliver Welsh (@oliverwelsh)

40 of 46 new or added lines in 5 files covered. (86.96%)

1 existing line in 1 file now uncovered.

8393 of 10409 relevant lines covered (80.63%)

3828.27 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #783.1 14 Apr 2024 05:01PM UTC 0
80.63
Source Files on build #783
Detailed source file information is not available for this build.
  • Back to Repo
  • fd81f36d on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc