-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[router][server] ACL optimization (#1521)
* [router][server] ACL optimization High-level idea: 1. For a keep-alive connection, the client cert will never change, so for the same store, it is useless to validate each request on the same connection. 2. In Server, there is an Acl Handler called `ServerAclHandler`, which is used to validate whether the connection is from Venice Router or not via static ACL. For each connection, Server will buffer the ACL check result in this attribute key: `SERVER_ACL_APPROVED_ATTRIBUTE_KEY`. And the ACL check result won't change during the lifetime of the Server instance. 3. In both Router and Server, there is a store-level ACL check, which can change during the lifetime of the Router/Server (ACL added/removed). The caching idea is a little different from #2, and it will maintain a cache map in the original connection, and for all the requests coming from this particular connection, it will check the acl check cache map first, and it will follow the previous result if the cache entry is not expired. If there is no such entry or the cache entry is expired, it will resort to the underlying access control to update the cache map. In theory, the acl check against the access controller will be minimized a lot. New config: acl.in.memory.cache.ttl.ms: 60000 (by default)
- Loading branch information
Showing
13 changed files
with
328 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.