• Dan Williams's avatar
    proxy/userspace: respect minSyncInterval and simplify locking · 8cf0076e
    Dan Williams authored
    The userspace proxy does not have any ratelimiting and when many
    services are used will hammer iptables every time a service or
    endpoint change occurs. Instead build up a map of changed
    services and process all those changes at once instead of each
    time an event comes in. This also ensures that no long-running
    processing happens in the same call chain as the OnService*
    calls as this blocks other handlers attached to the proxy's
    parent ServiceConfig object for long periods of time.
    
    Locking can also now be simplified as the only accesses to the
    proxy's serviceMap happen from syncProxyRules(). So instead of
    locking in many functions just lock once in syncProxyRules()
    like the other proxies do.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1590589
    https://bugzilla.redhat.com/show_bug.cgi?id=1689690
    8cf0076e