Hydra (core)

Hydra (core) is the NPM package which powers the Hydra project. If you're using ExpressJS to build your services you should checkout the Hydra-Express package designed specifically to leverage the underlying power of ExpressJS.

This section covers the core Hydra module which is designed to enable the construction of microservices and/or enable non-service applications to discover and utilize microservices. As such, Hydra helps address a broad class of concerns when building distributed applications.

While Hydra is implemented for NodeJS, the functionality it enables can be implemented for other platforms.

The core service dependency is on a shared Redis instance or cluster such as Amazon's ElasticCache

As a Node module, Hydra provides drop-in functionality which is designed to address the following microservice concerns:

  • Service Registration: allowing services to register themselves when they come online and to publish their HTTP API routes.
  • API Routability: allows API calls to be routed to a microservice.
  • Messaging Communication: Inter-service communication via publish and subscribe channels and Message Queues.
  • Service Load Balancing: automatically load balances requests based on available (present) instances of a microservice.
  • Service Discovery: locating services without having to hardcode their IP addresses and Port information.
  • Health Reporting: Automatic health check reporting, to answer questions such as: Is the application healthy? Is it functioning properly?
  • Presence Reporting: Is an instance of service actually available?

In this document we'll refer toservicesandservice instances. A Service Instance and Service Node refers to the same thing. A service is simply the name given to one or more service instances, consider it a class of service. For example, we might have a service to handle image resizing, and we might simply call that serviceimage-resizer. In our cloud infrastructure we might have three instances of the image-resizer service running in response to high demand. Each instance is a service instance or node.

In Hydra, a service instance is simply a process which uses Hydra to handle microservice concerns.

results matching ""

    No results matching ""