# How to deploy VIP / IPVS on ProxySQL container?

**URL:** <https://forums.percona.com/t/how-to-deploy-vip-ipvs-on-proxysql-container/7724>\
**Category:** ProxySQL\
**Created:** [June 28, 2020, 10:44pm UTC](https://forums.percona.com/t/how-to-deploy-vip-ipvs-on-proxysql-container/7724 "2020-06-28T22:44:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkthomas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lkthomas/32/1021_2.png) [@lkthomas](https://forums.percona.com/u/lkthomas)\
**Post date:** [June 28, 2020, 10:44pm UTC](https://forums.percona.com/t/how-to-deploy-vip-ipvs-on-proxysql-container/7724/1 "2020-06-28T22:44:03Z")

</div>

Recently we have been investigating running Percona cluster with ProxySQL on Docker Swarm, the following guide for reference: [Scaling Percona XtraDB Cluster with ProxySQL in Docker Swarm - Percona Database Performance Blog](https://www.percona.com/blog/2016/06/14/scaling-percona-xtradb-cluster-proxysql-docker-swarm/)  
Since ProxySQL is SQL load balancer in this Docker Stack, how could I set it up so that we could have active/passive ProxySQL containers running on two runners node with nearly instant fail-over, so all application will still using the same DB hostname / IP as target without changing anything?  
(And please, I don’t make the rule nor bends it, that’s our business requirement to have IP HA available on Docker Swarm)

---

<div class="post-metadata">

**Author:** ![DGB](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dgb/32/79_2.png) [@DGB](https://forums.percona.com/u/DGB)\
**Post date:** [July 23, 2020, 11:47am UTC](https://forums.percona.com/t/how-to-deploy-vip-ipvs-on-proxysql-container/7724/2 "2020-07-23T11:47:57Z")

</div>

Hi,  
With ProxySQL the first question you need to answer is: Where do i put it? You can check this blog post&nbsp;[https://www.percona.com/blog/2017/07/20/where-do-i-put-proxysql/](https://www.percona.com/blog/2017/07/20/where-do-i-put-proxysql/)&nbsp;but pretty much is either in the same server (or container) used by your apps or on its own layer. The suggested approach is always app+proxysql together and use the ProxySQL Cluster solution (&nbsp;[https://proxysql.com/documentation/ProxySQL-Cluster/](https://proxysql.com/documentation/ProxySQL-Cluster/)&nbsp;&nbsp;) to keep configuration in sync.&nbsp;  
And for HA you could use Keepalived to move the Virtual IPs, as described here:&nbsp;[https://www.percona.com/blog/2017/01/19/setup-proxysql-for-high-availability-not-single-point-failure/](https://www.percona.com/blog/2017/01/19/setup-proxysql-for-high-availability-not-single-point-failure/ "Link: https://www.percona.com/blog/2017/01/19/setup-proxysql-for-high-availability-not-single-point-failure/")&nbsp;However, implementation within Swarm might be different
