Introduction¶
The luna-serving is a deployment management service which is intended for provide user-made services info to load-balancer what is allows to proxy user requests to user-made services from luna-api.
Luna-Serving is intended to be used together with Traefik as load-balancer.
The Luna-Serving is intended to register user-made services and automatically provide a ready-to-use configuration
for load-balancer via HTTP through the /traefik_config endpoint.
For correct operation, Traefik must be configured to interact with luna-serving over HTTP,
for example by using the flag --providers.http.endpoint=http://${HOST_LUNA_SERVING}:${PORT_LUNA_SERVING}/traefik_config during startup.
For more traefik configuration details, see Traefik & HTTP.
Usage example:
User deploy 3 services on host1:port1, host1:port2 and host2:port3
User make service creation request specifying its own service name and host1:port1, host1:port2 and host2:port3 as service addresses and luna-serving will provides updated configuration including this service addresses to traefik
It is possible to get user service list or one service info by making get services and get service requests respectively
To remove such service from Luna-Serving and traefik it is allows to use remove service request
After service was created it is allows to using Luna-Api /service/<service-name>/proxy requests to user-made services with weighted round robin load-balancing strategy, for more details about proxy requests and access details, see Luna-Api developers documentations.
Note
Traefik has many options to configurate including http configuration poll interval which is 5 seconds by default, what means that service which was registered by user can be unavailable for proxy requests up to 5 seconds.