Using Redis with API throttling
Martini's throttling feature allows you to limit the number of allowed service invocations within a specified amount of time. To do this, Martini needs to keep a record of service invocations that have already occurred. By default, Martini stores this data in an in-memory data store, but it's possible to configure Martini to use Redis instead.
Production environments and throttling
If you are throttling API requests in a production or heavy-load environment, it's recommended to use Redis.
To use Redis:
Update the application property
throttling.datastoreso that its value is
Restart your instance. If successful, you should be able to see this log message in the console:
05/08/19 14:56:51.556 INFO [ThrottlingBeanConfig] Using redis Throttling datastore for Throttling API