ELB connection draining doesn't seem to work

33 views
Skip to first unread message

Florin Andrei

unread,
Dec 17, 2015, 4:39:13 PM12/17/15
to boto-users
Boto 2.38.0, Python 2.7.10, Mac OS X 10.11.1

Regular ELB hitting port 80/tcp on instances. Connection draining is enabled, with a timeout of 300 seconds.

I do this:

elb.deregister_instances(inst_id)

I'm watching SYN packets with tcpdump, TCP connections with netstat -tn, and the webserver logs with tail -f.

I expect the instance to switch to OutOfService status, SYN packets to stop arriving at the instance abruptly (maybe after a slight delay), connections from ELB to instance to die out gradually to zero, and instance to eventually get out of the ELB.

That's not what happens.

According to elb.instances, the instance is immediately removed from the ELB - it's not in that list anymore, effective immediately. But I still see SYN packets coming in for a while, and the web server keeps logging requests during that time. And then after a few seconds SYN packets stop coming in abruptly, number of connections from ELB to instance on port 80 drops to zero abruptly, and the webserver logs stop showing new events immediately.

It's like, it waits for a few seconds, and then it cuts it off immediately, without draining connections gradually. That's not how I thought connection draining should work.

Any ideas what could cause this? Thanks.
Reply all
Reply to author
Forward
0 new messages