Aggie Student Toolkit — Load Balancer CSCE 412 Project 4
Arnav Fotedar · Fall 2026 · C++ load balancer simulation
Loading...
Searching...
No Matches
ScaleEvent Struct Reference

One change to the server pool, kept for the scaling timeline in the log. More...

#include <LoadBalancer.h>

Public Types

enum class  Kind {
  Added , Reactivated , Removed , Retiring ,
  Retired
}
 What happened to the server. More...

Public Attributes

unsigned long cycle = 0
 Clock cycle of the change.
Kind kind = Kind::Added
 Type of change.
unsigned int serverId = 0
 Server affected.
std::size_t queueSize = 0
 Queue size that triggered the change.
std::size_t activeServers = 0
 Active (non-retiring) servers after the change.

Detailed Description

One change to the server pool, kept for the scaling timeline in the log.

Definition at line 40 of file LoadBalancer.h.

Member Enumeration Documentation

◆ Kind

enum class ScaleEvent::Kind
strong

What happened to the server.

Enumerator
Added 

A new server was created.

Reactivated 

A retiring server was returned to service instead of creating one.

Removed 

An idle server was removed immediately.

Retiring 

A busy server was marked to be removed after its current request.

Retired 

A retiring server finished its request and was removed.

Definition at line 42 of file LoadBalancer.h.

Member Data Documentation

◆ cycle

unsigned long ScaleEvent::cycle = 0

Clock cycle of the change.

Definition at line 49 of file LoadBalancer.h.

◆ kind

Kind ScaleEvent::kind = Kind::Added

Type of change.

Definition at line 50 of file LoadBalancer.h.

◆ serverId

unsigned int ScaleEvent::serverId = 0

Server affected.

Definition at line 51 of file LoadBalancer.h.

◆ queueSize

std::size_t ScaleEvent::queueSize = 0

Queue size that triggered the change.

Definition at line 52 of file LoadBalancer.h.

◆ activeServers

std::size_t ScaleEvent::activeServers = 0

Active (non-retiring) servers after the change.

Definition at line 53 of file LoadBalancer.h.


The documentation for this struct was generated from the following file: