Building apps with FireLoop is nice and easy, but that would be worthless if the platform wouldn’t scale into multiple server or even process instances.
The following documentation will explain how to enable FireLoop to work under clustered environments.
- SDK Builder v2.1.0-rc.10+
- LoopBack Component Real-Time v1.0.0-rc.5+
- Socket IO Adapter (Any valid socket.io-adapter like socket.io-adapter-mongo, socket.io-redis, etc)
- PubSub capable database like MongoDB or Redis
If you already selected MongoDB or Redis database for your API Models, you won’t need to create a new datasource, users using any other databases like SQL ones, will require to create a new datasource pointing to MongoDB or Redis and install its LoopBack dependency.
and configure as any other LoopBack datasource, example:
In order to enable the clustering mode, we need to set the following configurations:
Please note that the
adapter.name should be the adapter you selected and installed prior this process, as well as the
adapter.datasource should be the name of the datasource you created.
After following the configurations above, FireLoop will work either on clustered process or server environments.