yanet-platform / yanet

A high performance framework for forwarding traffic based on DPDK
Other
171 stars 18 forks source link

Do not rebuild the whole real mapping ring on each update #35

Open GeorgyKirichenko opened 1 year ago

GeorgyKirichenko commented 1 year ago

globalBase maintains two arrays with service real mappings. For each instance corresponding mappings placed continuously without any space between two services. This means that any change in real state may lead to whole instance rebuild - and this is why there are two instances.

The main idea is to preallocate the maximal possible amount of space for each service. In the case any real update will touch only the real service partition of the array and do not require the whole mapping rebuild. Furthermore, we could update mappings in place without maintaining two of mapping instances. The only thing we should care here is not to address invalid real for a service - so real identifiers for a service should be updated before the service mapping size.

GeorgyKirichenko commented 1 year ago

This is prerequisite for #33