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.

Clone this wiki locally