Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.
In response to each MRCEvent the MRC reconciler lists all MRCs in the mesh. Listing all MRCs for each event is done to achieve a level-triggered design. On startup or restart, each existing MRC triggers a create event resulting in O(NM) operations, where N is the number events and M is the number of MRCs in the mesh. This could potentially have an impact on the mesh's performance.
One approach to optimizing event handling is to use a custom informer index:
In response to each MRCEvent the MRC reconciler lists all MRCs in the mesh. Listing all MRCs for each event is done to achieve a level-triggered design. On startup or restart, each existing MRC triggers a create event resulting in O(NM) operations, where N is the number events and M is the number of MRCs in the mesh. This could potentially have an impact on the mesh's performance.
One approach to optimizing event handling is to use a custom informer index:
Related discussion: https://github.com/openservicemesh/osm/pull/5201#discussion_r996326422