Hi, On Wed, Dec 04, 2019 at 01:47:47PM +0000, Serguei Bezverkhi (sbezverk) wrote: > Thank you for your reply. It is very unfortunate indeed. Here is the scenario where I thought to use a non-anonymous vmap. > > Each k8s service can have 0, 1 or more associated endpoints, backends (pods providing this service). 0 endpoint already taken care of in filter prerouting hook. When there are 1 or more, proxy needs to load balance incoming connections between endpoints.I thought to create vmap per service with 1 rule per service . When an endpoint gets updated (add/deleted) which could happen anytime then the only vmap get corresponding update and my hope was that automagically load balancing will be adjusted to use updated endpoints list. > > With what you explained, I am not sure if dynamic load balancing is possible at all. If numgen work only with static anonymous vmap and fixed modulus , the only way to address this dynamic nature of endpoints is to recreate service rule everytime when number of endpoints changes (recalculate modulus and entries in vmap). I suspect it is way less efficient. Well, if you have a modulus of, say, 5 and your vmap contains only entries 0 to 3 your setup is broken anyway. So I guess you will need to adjust modulus along with entries in vmap at all times. What is the iptables-equivalent you want to replace? Maybe that serves as inspiration for how to solve it in nftables. > What will happen to dataplane and packets in transit when the rule will be deleted and then recreated? I suspect it might result in dropped packets, could you please comment on the possible impact? Well, you could replace the rule in a single transaction, that would eliminate the timespan the rule doesn't exist. AFAICT, this is RCU-based so packets will either hit the old or the new rule then. Cheers, Phil