EpistasisLab / EpistasisLab/Aliro

Support for machine instance scaling

Open
#148 1 comment 0 reactions 1 assignee Claimed by @hjwilli View on GitHub
Dominant language
JavaScript
Stars
238
Forks
60
PR merge metrics
No merged PRs in 30d

Description

**Service discovery**
Service discovery is the automatic discovery and registration of services (in this case machine instances) that are available to use. With the current setup, during the machine initialization process it registers itself with and it's details (the url and external port it can be reached by other containers, the algorithms it can run) with the main lab server. The lab server is responsible for load balancing ml requests among the registered machines. Machine registration/load balancing on the lab server needs to be updated and tested (it has not been run with more then one machine), and a method to unregister machines needs to be added.

**Static scaling**
Static scaling implementation would comprise a custom docker-compose configuration with multiple hardcoded machine instances with static port assignments.

**Dynamic scaling**
Docker orchestrators (docker-compose, [kubertenes](https://kubernetes.io/0), etc) support dynamic scaling. For example, initializing with `docker-compose up --scale machine=3` will create 3 machine instances, but the external ports assigned to each instance are dynamically allocated (a range can be specified) and docker does not have a simple introspection method that allows an instance to see what external ports it has been assigned. This means that the current self-registration method for machines will need to be modified.

Common practice seems to be to implement dynamic service discovery and registration with something like [Etcd and Haproxy](http://jasonwilder.com/blog/2014/07/15/docker-service-discovery/}). This kind of service watches the events docker emits as containers are created and destroyed, and can register/unregister machine instances accordingly.

**Implementation**
Static scaling is easier to implement but does not take advantage of the dynamic scaling capabilities of docker orchestrators and would be more difficult to test and configure for different environments. Dynamic scaling would allow use of features like docker load balancing, container restartability and dependency. It may require a slightly more complicated architecture (the reg/discovery service), but once implemented custom configuration would be easier and better tested.

Will start with implementing a static scaling solution; this will allow initial implementation/testing of the machine registration and load balancing done by the lab server, and allow implementation of methods to unregister a machine. Once working, will work on implementing (perhaps optional) dynamic service discovery/registration architecture.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.