Open oleksiiprokhorenko opened 1 month ago
it is unfortunately not. and probably won't be for the foreseeable future You can technically run lelastic with 2x primary or 2x secondary instances but the traffic behavior would be not defined. like some traffic would fail back, some would not and its not necessarily a 50:50 split or even close to that. all traffic would still land on SOME machine though.
what you could do is implement some internal check between your system. (or parse the logs of leleastic) and modify the primary/secondary behavior of the instance on the fly through the gobgp api. this however is not in scope for lelastic and a more advanced tool/setup would be needed.
lelastic under the hood is just gobgp wrapper intended as a quick-starter tool. primary and secondary is signaled by the use of BGP communities.
there is a more advanced doc for ip sharing here: https://techdocs.akamai.com/cloud-computing/docs/configuring-ip-failover-over-bgp-using-frr-advanced
in this case frr is used as bgp speaker but it would also work similarly with gobgp unfortunately this guide would still not address your specific issue, but provides more context
Hello,
We have a stateful app that is running on two VMs: VM1 ( /usr/local/bin/lelastic -dcid XX -primary &) VM2 (/usr/local/bin/lelastic -dcid XX -secondary &)
When VM1 is down, the elastic IP is moved to VM2 and that is a session interruption for customers, but that's OK. Once VM1 is up, the elastic IP is moved back to VM1 and that's another session interruption for customers. Is this possible to run lelastic in some way (both with -primary flag?) that prevent fail recovery mechanism? If the IP is failed back to VM2, lets it running from VM2 until tthe VM2 is up, even VM1 become online as well?
Thank you.