Skip to content

loadbalancer

Carlos Villanueva edited this page Sep 19, 2020 · 2 revisions

Load Balancer

Load Balancers are managed via the loadbalancer route and package. Requests made to this route are purely for META aggregation and reporting.

TOC

Aggregation

The /api/v1/source/loadbalancer route is used to collect all load balancer configurations. This operation is both concurrent and parallelized with a fixed semaphore of 64. This semaphore can be reduced if the parallelized requests are overloading the API.

Workflow

  • POST /api/v1/source/loadbalancer will execute aggregation process
  • API will query the load balancer table and return the load_balancer_ip and manufacturer of each load balancer and compile a target list.
  • API will loop through the target list, run the common.FetchAll() method from within a Go routine, and throttle the Go routines based on the semaphore value.
  • Each Go routine will collect load balancer facts and write a LBRecordCollection struct into a channel
  • As the API receives each channel, it will add it to a LBRecordCollection list
  • Once all channels are collected, the API will write the collections to the database

Clone this wiki locally