Skip to content

dpep/network_resiliency_rb

Repository files navigation

NetworkResiliency

Gem codecov

Making network requests more resilient

  • waste less time on failures by using dynamic, granular timeouts and deadeline propagation
  • reduce errors by automatically retrying idempotent calls
  • observe every network connection and request
require "network_resiliency"

NetworkResiliency.configure do |conf|
  conf.statsd = Datadog::Statsd.new
end

Redis.new.ping

Contributing

Yes please :)

  1. Fork it
  2. Create your feature branch (git checkout -b my-feature)
  3. Ensure the tests pass (bundle exec rspec)
  4. Commit your changes (git commit -am 'awesome new feature')
  5. Push your branch (git push origin my-feature)
  6. Create a Pull Request

Inspired by

https://github.com/lostisland/faraday-retry/blob/main/lib/faraday/retry/middleware.rb

https://github.com/ankane/the-ultimate-guide-to-ruby-timeouts

https://reprep.io/writings/20220326_timeouts_deadline_propagation.html

https://grpc.io/blog/deadlines

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages