Skip to content

ThomasObenaus/sokar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sokar

Go Report Card Maintainability Coverage Status FOSSA Status

Quality Gate Status Code Smells Lines of Code Maintainability Rating Reliability Rating Security Rating Technical Debt Vulnerabilities

Overview

Purpose

Sokar is a generic alert based auto-scaler for cloud systems.

If you are running your microservices on a container orchestration system like Nomad or kubernetes, then you are probably also need to scale them based on the load varying over time. The same situation applies if your system runs directly on AWS EC2 instances and thus they have to be scaled out with increased and scaled in with a reduction of the load. Usually the decision to scale is made based on metrics like current CPU/ RAM utilization or requests per second. But often you might want to use custom metrics like the length of a job-queue, the number of processed images per second or even a combination of those.

Here comes sokar into play. Sokar is a generic auto-scaler that makes scale up/ down decisions based on scale alerts. He constantly evaluates the incoming scaling alerts, aggregates them and then scales the desired ScaleObject (i.e. microservice or an EC2 instance). Even if multiple metrics shall be taken into account for scaling the ScaleObject, those metrics just have to be expressed as scaling alerts and sokar will use them accordingly for scaling.

doc/overview_coarse.png

Benefit

  1. Possibility to combine multiple metrics to be taken into account for the scaling decisions. The impact of those metrics, expressed as scale alerts, can be easily adjusted by configuring suitable weights.
  2. Use the connectors to scale the actual ScaleObject. No need to implement the communication with the Container Orchestration System in this regard. The supported connectors can be found here.
  3. Configurable and ready to use capacity planning, providing separate cool downs for up and down scaling. Further more it is possible to select the planning mode which fits best for your workload.

State

At the moment sokar is able to scale Nomad jobs, Nomad instances (running on AWS) and AWS EC2 instances. For details about the changes see the changelog.

Build and Run

One can build and run sokar either in docker or directly on the host.

On Host

# build
make build

# run (as scaler for nomad jobs)
make run.nomad-job

Docker

# build
make docker.build

# pull it from docker hub
docker pull thobe/sokar

# run (as scaler for nomad jobs)
docker run -p 11000:11000 thobe/sokar:latest
# example
docker run -p 11000:11000 thobe/sokar:latest

For more configuration options and how to specify if sokar shall run as scaler for nomad jobs, nomad instances or AWS instances see Config.md.

Features

Links