Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Cloud Overview

Internal Communications


An

Environment

environment is represented by a cloud of

micro-services

microservices, and multiple environments form up a product (dev

-

/stg

-

/prod).

To visualize this behavior better, the image below shows how one environment cloud behaves internally.

The cloud entry point is the nginx layer which can consist

of

of N

instances

 instances. When a user makes a request to the domain, the nginx is the first to pick it up.

The nginx then upstreams the request arriving at port 80 or 443 to the

controller

Gateway layer that is listening on port 4000.

The

controller

Gateway layer can also

contain

contain N

instances

 instances and once one of them receives the request from the Nginx, it analyzes it and redirects it to the corresponding

micro-service

microservice so that the later can handle it.

The

micro-services

microservices can also

contain

contain N

instances

 instances each for redundancy and the overall result is a high available cloud.

This redundancy serves as a load balancer to maintain system-wide high responsiveness and mitigate sluggishness.

GliffyimageAttachmentIdatt56426560nameSOAJS ClouddiagramAttachmentId

att56426559

Internal Communication

In addition to how requests arriving from outside the cloud are handled, the cloud also provides a network flow for its

micro-services

microservices to communicate with one another.

Since the

controller

Gateway is the only layer that knows if services are alive or not, then every service that needs to communicate with another service should do so via the cloud's

controller

Gateway(s)

.

The service first looks for an available controller to make the internal request, then it invokes it and pass on the inputs.

The same behavior in terms of load balancing is applied when internal cloud communication occurs.

The only difference is that services within the cloud communicate with one another using the private network IP range instead of going outside the cloud then back in.

This behavior explains why there are bidirectional white arrows inside the cloud between services and controllers whereas the arrow from nginx towards the controller is pointing in one direction only.

GliffyimageAttachmentIdatt56426590nameinternal cloud communicationdiagramAttachmentIdatt56426589

unless interConnect is turned on then the Gateway will augment the request with the needed information empowering microservices to communicate directly while maintaining multitenancy.

Image Added