On 6/15/20 12:56 AM, Yi Yang (杨燚)-云服务集团 wrote:
> My next hops are final real servers but not load balancers, say we sets 
> maximum number of servers to 64, but next hop entry is added or removed 
> dynamically, we are unlikely to know them beforehand. I can't understand how 
> user space can attain consistent distribution without in-kernel consistent 
> hashing, can you show how ip route cmds can attain this?
> 

I do not see how consistent hashing can be done in the kernel without
affecting performance, and a second problem is having it do the right
thing for all use cases. That said, feel free to try to implement it.

> I find routing cache can help fix this issue, if a flow has been routed to a 
> real server, then its route has been cached, so packets in this flow should 
> hit routing cache by fib_lookup, so this can make sure it can be always 
> routed to right server, as far as the result is concerned, it is equivalent 
> to consistent hashing. 
> 

route cache is invalidated anytime there is a change to the FIB.

Reply via email to