-
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.