Using Event or Redis


#1

Hi

Wondering if Event scale past 1 process very well or is it better off just to use Redis pub/sub?

I will likely end up with a number of servers hosting Adonis app behind a load balancer and trying to find a reliable way to action async events.


#2

Hi,
If you use many instance of your adonis server behind a load balancer, the bast choice is to use Redis pub/sub. you will be able to share event across all your instances.


#3

Hi

thanks for confirming my thoughts.

https://adonisjs.com/docs/4.1/redis

documentation mentions:

" Configuration, events API and all the methods from IoRedis are 100% supported. Make sure to read ioredis docs as well."

Are there examples of Redis and events API working together?


#4

Redis has its own pub/sub interface and mentioned in the docs. You don’t need EventEmitter


#5

Thanks I was hoping to somehow get similar functionality to EventEmitter (E.g. Event.once())