fabiolb / fabio

Consul Load-Balancing made simple
https://fabiolb.net
MIT License
7.25k stars 619 forks source link

[Question] What are opinions on allowing stale reads of Consul Catalog #764

Closed ddreier closed 3 years ago

ddreier commented 4 years ago

I'm curious about folks' opinion on allowing Fabio to make stale reads for the Consul Catalog backend. Currently Fabio is hard-coded to require consistent reads, which causes any request to go to the current leader in the Consul cluster.

In order to try to reduce load on our Consul leaders, we're testing out several changes to the way we run Fabio. This includes switching Fabio to perform stale reads so that the read load can be spread across all of the Consul servers.

A little info about our environment: We run several Nomad/Consul/Vault clusters the largest of which has about 1500 Consul Services and around 200 Fabio instances averaging several thousand routes. One of the Fabio "pools" has almost 10k routes.

If the maintainers are amenable to it I'd be happy to open a PR to add a config option for stale reads.

Thanks!

scalp42 commented 3 years ago

Leader elections are an issue as well. Being able to allow stale reads would prevent the services from de-registering.

PR incoming.

aaronhurt commented 3 years ago

We'd definitely be interested in reviewing the PR. Keep us posted.

scalp42 commented 3 years ago

@leprechau sorry PR is #811 which prevents Fabio from dropping routes on leader election.

aaronhurt commented 3 years ago

@scalp42 see it, thank you. Going to close this question as the discussion appears to be in #811.