# Draining backend

**URL:** <https://community.traefik.io/t/draining-backend/10471>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress\
**Created:** [April 27, 2021, 10:42am UTC](https://community.traefik.io/t/draining-backend/10471 "2021-04-27T10:42:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![titansmc](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/titansmc/32/2766_2.png) [@titansmc](https://community.traefik.io/u/titansmc)\
**Post date:** [April 27, 2021, 10:42am UTC](https://community.traefik.io/t/draining-backend/10471/1 "2021-04-27T10:42:06Z")

</div>

Hi,  
I am trying to achieve zero down time deployment with Traefik. It is a legacy Java app that holds long living connections and a user that started a session with a running container, should finish there, and only new connections should go to the new container being deployed. Basically,  
1- The container is running  
2- Users connect to it  
3- New version is deployed  
4- Both containers are running simultaneously  
5- Old sessions still go to the initial container but new ones go to the just deployed container.  
6- After the old pod has no more connections it dies .  
How would I be able to achieve that?

Thanks.
