-
Notifications
You must be signed in to change notification settings - Fork 232
Functional Block: SOL
The Solicitor (SOL) block is responsible for maintaining, rate limiting, and sending requests. Requests packets are organized by priority and only permitted a fraction of the link capacity between Gatekeeper and Grantor, and it's up to the Solicitor block to enforce these constraints .It only runs when the Gatekeeper program is being run as a Gatekeeper server.
The SOL block is allocated one lcore in Gatekeeper.
After a GK instance decides that a flow needs to request permission from Grantor to send to the destination, it enqueues the request packet in the Solicitor block's mailbox. The Solicitor block repeatedly takes request packets from its mailbox and enqueues it into a priority queue to be sent to Grantor.
The priority queue is implemented as a length-limited linked list, providing constant time insertion, dequeueing of the highest priority request, and deletion of the lowest priority request when the queue is full.
After enqueueing a set of requests into the priority queue, the Solicitor block dequeues requests to transmit to Grantor. It uses a token bucket algorithm to only utilize 5% of the link bandwidth for requests, so when under high usage (or an attack) it may not completely empty the priority queue at every iteration.
All static configuration variables can be configured in lua/sol.lua.
These variables are likely to change from deployment-to-deployment based on the operator's preferences.
log_level
The log level for the SOL block. Can be set to any one of the following values: RTE_LOG_EMERG, RTE_LOG_ALERT, RTE_LOG_CRIT, RTE_LOG_ERR, RTE_LOG_WARNING, RTE_LOG_NOTICE, RTE_LOG_INFO, RTE_LOG_DEBUG.
Since we typically use RTE_LOG_ERROR as the most severe log condition, we recommend not to set this value below RTE_LOG_ERROR.
It is not crucial to change these variables, and they only need to be changed to fine tune the performance of Gatekeeper. Otherwise, the default values are likely fine.
mailbox_mem_cache_size
Number of mailbox entries to keep in the cache for more efficient use of the mailbox. Set to 0 to disable the cache of the memory pool for the mailbox.
log_ratelimit_interval_ms
The interval at which logs are rate limited (in milliseconds). For a given interval, only log_ratelimit_burst log entries are permitted. The count of entries is reset for each new interval.
log_ratelimit_burst
The number of entries per interval allowed to be logged. When the number of log entries exceeds this limit in a given interval, the entries will be dropped.