These are chat archives for fanout/pushpin

Dec 2017
Dec 06 2017 13:46
A question about scaling out your backend:
In a scenario where you have x pushpin instances and y backend instances. Lets say 4 pushpin instances connected to 2 backend instances.
Pushpin1 and pushpin2 are connected to backend1 and pushpin2 og pushpin3 are connected to backend2. Incoming requests are routed to pushpin instances on a round robin basis. If backend1 goes down and is not responding. Is there any way of letting pushpin1 and pushpin2 reconnect with backend2?
Dec 06 2017 15:06
It should be: pushpin3 and pushpin4 connected to backend2 :)
Justin Karneges
Dec 06 2017 17:58
hi @larshelg , the best answer is to use a load balancer between the pushpins and backends. so load from pushpin1,2,3,4 would be evenly balanced across backend1,2, and if backend1 goes down then all pushpins send to backend2
pushpin itself does have some fallback capabilities. if a backend hostname has multiple DNS records it will try each until one works. and you can also specify multiple targets for a route (e.g. * backend1:80 backend2:80). but the decisions are made at the time of connect and may involve long timeouts
load balancers typically pre-check each backend in the background, so when a new request arrives it already knows in advance where to forward it so there is no waiting
Dec 06 2017 19:30
@jkarneges Thanks for the quick reply. I will try out with a load balancer.