cap-js-community / event-queue

An event queue that enables secure multi-tenant enabled transactional processing of asynchronous events, featuring instant event processing with Redis Pub/Sub and load distribution across all application instances.
https://cap-js-community.github.io/event-queue/
Apache License 2.0
12 stars 1 forks source link

When would you use the "disableRedis" config option? #72

Closed js1972 closed 11 months ago

js1972 commented 11 months ago

Wondering about the pros and cons of this setting. For example - if you are using periodic events - is redis still used / can it be disabled?

soccermax commented 11 months ago

The event-queue automatically utilizes Redis if a Redis service is bound to the app. However, if you have Redis bound to your Cloud Foundry app and prefer not to use the event-queue with Redis, this option has been introduced.

In regards to the event-queue, there are no advantages of disabling redis.

Nevertheless, using Redis has many benefits, including:

Redis is used to facilitate communication between multiple app instances.

Does this answer your question?

js1972 commented 11 months ago

Ok so it sounds like if there is just one app instance and I'm using periodic events then redis doesn't do much. But with multiple app instances it can spread the load.

Is there any benefit to binding a redis instance if one app instance and periodic events that I'm missing?

soccermax commented 11 months ago

Not much. There are minor performance benefits with Redis. But you can definitely start without Redis and grow as you go. If you see the need later on to add multiple app instances for resilience and/or performance reasons, you can still bind a Redis instance without doing any migration.

js1972 commented 11 months ago

Great to know. Thanks for all your help on these little q&a issues. ;-) I'm looking forward to testing this out...