Hi Elias,

> I would like to ask about the status of the Active-Passive NAT HA (high
> availability) code in src/plugins/nat/nat_ha.c and nat_ha.h. In the git
> history it looks like it was added by Matus Fabian in February 2019,
> with few changes since then.
> 
> Having looked at it and tested it I think it is partly working, it can
> indeed sync sessions from the active to the passive vpp server, but the
> "resync" functionality needed to (re-)send all session data to a new
> passive vpp server is as far as I can tell not fully implemented. In
> particular, the function nat_ha_resync declared in nat_ha.h is not
> implemented in nat_ha.c which makes vpp crash when trying to use the
> "nat ha resync" command in vppctl.
> 
> The "resync" functionality would be really good to have since that
> would allow us to restore the primary server in a situation when the
> secondary has taken over, if resync is supported then the secondary can
> send the session data back again once the primary has been
> fixed/upgraded and then the original setup with the redundancy can be
> recovered, all without breaking existing user sessions.
> 
> Is anyone working on that part of the code now, or using it, or have
> some idea about its status?
> 
> Any advice in case I were to try implementing the missing pieces
> myself?

The NAT HA code was something Matus ported across from another project.
The other work, was an experiment with a split of the NAT fast-path and 
slow-path, with a protocol between them.
The NAT fast-path (aka the NAT DP) used a flow cache, with instructions. On 
cache miss it would send a protocol packet to the NAT slow path / NAT CP, 
asking for instructions for this flow.
The flow cache was uni-directional. And forward / reverse flow could be on 
different VPP instances, as could the NAT CP.

In our experiment the NAT CP also ran on VPP (although it doesn't have to). And 
while the NAT DP instances by design don't need HA functionality, the backend 
NAT CP would have to.
The bits of NAT HA was upstreamed by Matus from that experiment.

It hasn't been worked on since as far as I know.
Filip probably has a better understanding of the details of that code.
Happy to help of course, and happy to declare you the owner of NAT HA from now 
on. ;-)

Upstreaming the "programmable flow NAT" is on my list. It will be in a separate 
plugin. Let me know if you are interested / want to contribute.

Best regards,
Ole

PS: On a more personal rant. I dislike HA solutions in general. They tend to, 
by their increased level of complexity, to decrease reliability.
One benefit of IPv4 run-out is that applications/the transport layer has been 
trained to expect that the network holds session state, and that it's the 
applications responsibility to maintain that session state in the network. I 
wouldn't be so worried about dropping sessions in the case of an unexpected 
event. Applications will recreate session. At least something worth testing.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14728): https://lists.fd.io/g/vpp-dev/message/14728
Mute This Topic: https://lists.fd.io/mt/64117356/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to