nats-hemera
Advanced tools
{ | ||
"name": "nats-hemera", | ||
"version": "0.1.26", | ||
"version": "0.1.27", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -6,3 +6,3 @@ # Hemera | ||
[](https://travis-ci.org/StarpTech/hemera) | ||
[](https://www.npmjs.com/package/@starptech/hemera) | ||
[](https://www.npmjs.com/package/nats-hemera) | ||
[](https://coveralls.io/github/StarpTech/hemera?branch=master) | ||
@@ -23,16 +23,16 @@ | ||
### Service Discovery | ||
- Missing services are spawned by the control service. | ||
- Any subscription is managed by NATS. You don't need any service discovery. Totally location transparency. | ||
### Scalability | ||
- Filtering on the subject name enables services to divide work (perhaps with locality) e.g `topic:auth:germany` | ||
- Queue group name allow load balancing of services. | ||
- Filtering enables limiting the impact of a request based on a subject name. | ||
### Fault tolerance | ||
- Auto-heals when new services are added | ||
- Cluster mode | ||
- Auto-heals when new services are added. | ||
- Configure cluster mode to be more reliable. | ||
### Load Balancing | ||
- Queue groups | ||
- HTTP/REST endpoints use a redirector or scaling strategy | ||
- Queue groups are used by default in Hemera. | ||
\+ **Hemera** = _Pattern-driven micro services._ | ||
@@ -318,10 +318,15 @@ | ||
#### Create another instance of it. | ||
#### Create multiple instances of your service. | ||
Now your service is scaled. | ||
```js | ||
node service.js | ||
node service.js | ||
``` | ||
#### Create another NATS Server and create a cluster. | ||
Now your service is fault-tolerant. | ||
``` | ||
```js | ||
var servers = ['nats://nats.io:4222', 'nats://nats.io:5222', 'nats://nats.io:6222']; | ||
@@ -351,3 +356,3 @@ var nc = nats.connect({'servers': servers}); | ||
Set the path to the `gnatsd` before start testing. | ||
``` | ||
@@ -354,0 +359,0 @@ npm run test |
30330
0.66%392
1.29%