Server Fault Asked by zsolt.k on January 1, 2022
I need some advice about AWS autoscaling, loadbalancers and health checks:
is it possible to distinguish two health checking mechanism, one is when to send or do not send traffic to an instance (but do not terminate/replace it), and the another is when to terminate/replace that instance.
Scenarios:
Thanks in advance for the answers.
It's not clear if you're using EC2 or ECS, and what type of ELB you're using and depends as well on type of app you're running. Please provide those details and little bit about your application stack if you want better answer.
In general when the client request hits the ELB it determines on which instance it "routes/send" the traffic (based on configuration let's say round-robin), when you remove the instance from ELB it doesn't mean the currently established connections are automagically routed to the remaining instance(s). You shall wait or monitor active connections on removed instance to get details, and when you see there aren't any active connections perform the maintenance (i.e. reboot the instance after upgarde).
One of the key factors is what holds the information about the current established sessions. If each instance is holding sessions separately "half of logged in users will be logged out". What you need to do is to store the session "somewhere else" often in ElastiCache or in DB/RDS, so when you remove the instance session remain connected (no logged out users). If you hold your sessions separately, when you remove the instance from ELB you can nuke it nearly immediately (but again, this depends on the app you're running)
There is very good information in AWS documentation:
Detach EC2 from autoscaling group
Temporary remove instace from autoscaling group
Answered by Geeky Masters on January 1, 2022
1 Asked on December 18, 2021
2 Asked on December 18, 2021 by herzog
1 Asked on December 18, 2021 by brian-sidebotham
1 Asked on December 16, 2021 by sk8erpeter
2 Asked on December 16, 2021 by vonsch
1 Asked on December 16, 2021 by saiyen2002
1 Asked on December 16, 2021 by nagendra-kumar
1 Asked on December 16, 2021 by prasta-maha
1 Asked on December 16, 2021
1 Asked on December 16, 2021
1 Asked on December 16, 2021 by ben-jones
1 Asked on December 16, 2021 by naps1saps
1 Asked on December 13, 2021 by 13bloc
4 Asked on December 13, 2021 by zulakis
2 Asked on December 13, 2021 by fips123
1 Asked on December 13, 2021 by johnsongoey
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP