Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

googleinterns/k8s-topology-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Topology Simulator

This is not an officially supported Google product.

This will be a key part in the planning and design of topology aware routing for Kubernetes. This specific project will include:

  • Building a tool that can be used to test the effectiveness of different topology aware routing algorithms.
  • Tweaking algorithms that have already been proposed or propose new ones.
  • Writing a report that summarizes the different approaches that can be used for topology aware routing along with a recommendation.

Usage

Single algorithm usage

go run main.go -input=inputFile -output=outputFile -alg=algorithm

example of intput file (csv): each zone with number of nodes first, number of endpoints next

input name, zone1, zone2, zone3  
perfect input, 10 10, 10 10, 20 20

Multiple algorithms usage

sh ./run-all.sh [input-file]

input-file is optional, ./data/range-input.csv is set as default which can be generated by range-input-generator.py described below.

Large input files generator/parser

cd hack
python3 range-input-generator.py # generate large input dataset
python3 results-parser.py # parse large output results

range-input-generator.py is used to generate very large input dataset. It is designed to evaluate algorithms based on a large range of dataset.

range-input-generator.py will generate a file named range-input.csv in the data directory.

results-parser.py is used to parse output files(csv). It can be used to parse any output files generated by the program. But it is designed to evaluate all algorithms we have at once. The output files can also be parsed by any other csv parsers.

results-parser.py will generate a csv file named results.csv and a text file names details.out in the data directory.

Interfaces

  1. Implement algorithms comply with the RoutingAlgorithm interface.
type RoutingAlgorithm struct {
    // CreateSliceGroups translates regionInfo into EndpointSliceGroups
    CreateSliceGroups(data.RegionInfo) (map[string]data.EndpointSliceGroup, error)
}
  1. Add an entry of the algorithm to NewAlgorithm(name string) RoutingAlgorithm introduced in algorithms.go

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages