An example microservice system using Hemera and best of today

 
  about 185 words  1 min 

aither
aither

aither

Aither shows an approach how to bootstrap a microservice system with Hemera and docker. You can scale your worker in seconds and because we use NATS as “nervous system” for our distributed system we do not have to carry about service-discovery or load-balancing of hemera-services. We use traefik to load-balancing the api-gateway.

This configuration will setup:

  • Hapi http server which act as api-gataway to the Hemera services.
  • Microservice example which is responsible to add two numbers.
  • NATS server the underlying messaging system for Hemera.
  • Zipkin dashboard to monitoring your distributed system.
  • Natsboard dashboard to monitoring your NATS system in realtime.
  • Traefik modern HTTP reverse proxy and load balancer made to deploy microservices with ease.

Architecture

aither
aither

Running the system

1
docker-compose up

Scaling the system

1
docker-compose scale worker=5 api=2

Run load test

1
2
npm install -g artillery
artillery run loadtest.yml

Start a request against load balancer

1
http://localhost:8182/api/add?a=1&b=10

Traefik dashboard

http://localhost:8181/

NATS dashboard

http://localhost:3000/

NATS monitoring endpoint

http://localhost:8222/

Zipkin dashboard

http://localhost:9411/

Thank you

thanks most of all to the community who create these awesome opensource software and thereby making it possible.