Skip to content

Clustering microservices #121

Closed
Closed
@daffl

Description

1) Event propagation in a cluster

When two instance of the same application are running in different processes or on different machines created, updated, patched and removed service events should be propagated through the entire cluster. That way every connected client will also be notified of any change no matter where it happened.

This can be done by using a master (e.g. the cluster master) as the event dispatching hub and have all client services subscribe and emit events to that master event emitter which then dispatches it to all slaves. It might be necessary for different implementations e.g. the Cluster module and Redis (or other message queuing mechanisms).

2) Individual remote services

The other case is having different services distributed over different applications. Once #118 is resolved this should be simply possible by dropping in a remote service using any communication mechanism (e.g. websockets) like:

// todos.js
var feathers = require('feathers');
var app = feathers();
var wsClient = require('feathers-websocket-client');

app.use('/todos', todoService);
app.use('/users', wsClient('http://api.myapp.com/users'));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions