Skip to content

Functional Block: SOL

Cody Doucette edited this page Mar 29, 2019 · 14 revisions

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.

Table of Contents

Description

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.

Configuration

Static Configuration

All static configuration variables can be configured in lua/sol.lua.

Variables to Change for Basic Operation

These variables are likely to change from deployment-to-deployment based on the operator's preferences.

Log Level

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.

Variables to Change for Performance Reasons

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 Cache Size

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 Rate Limit Interval

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 Rate Limit Burst

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.

Priority Queue Maximum Length

pri_req_max_len

Maximum length of the priority queue for requests. When the priority queue is full and an additional request is made, the lowest priority request will be dropped. If the new request is the lowest priority, then is dropped.

Request Channel Bandwidth Rate

req_bw_rate

Bandwidth limit for the priority queue of requests, specified as a fraction of the link capacity.

Priority Queue Maximum Packet Bursts

enq_burst_size & deq_burst_size

enq_burst_size is the maximum number of requests enqueued into the Solicitor block's priority queue at one time. deq_burst_size is the maximum number of requests dequeued from the priority queue at once; it will be fewer for each iteration if there are not that many requests available in the queue or if the request channel bandwidth has been exhausted.

Variables Unlikely to Change

These variables likely only need to be changed under extreme circumstances or for deployment-specific reasons.

Clone this wiki locally