Rate limiting app services
Rate limiting puts a cap on how often someone can call an endpoint or client library method of your app within a certain timeframe – for instance, trying to log in to an account. By rate limiting, you can help stop certain kinds of malicious bot activity.
In Altogic you can define rate limits for
- the oveall application
- Each endpoint
- Client keys
Additionally you can specify rate limits separately for services (e.g., endpoints and client API RESTful calls) and realtime messaging.
The overall application level rate limits are applied if no client key or endpoint specific endpoint is found. On the other hand if the endpoint or the client key has a rate limit then Altogic applies that rate limit instead of the application level one.
info
We highly recommend defining the application level rate limits for endpoints and realtime messaging to stop malicious activity and control your environment resource consumption.
Creating rate limits
Depending on your business needs, you can create as rate limits as you like in the App settings view. In our example below, we create two rate limits, one called for endpoint services and the other for realtime messaging.To create a rate limit, you need to navigate to the App settings view in designer and select Rate limiting.
Setting application default rate limits
You can set the default application level rate limits from the App settings view. From the App settings select App info and choose the rate limits that you would like to apply for services and realtime messaging and click/tap on Apply rate limit.
Setting endpoint specific rate limits
You can also specify a custom rate limit for each endpoint. When creating new endpoint or updating an existing one, from the Rate limiting tab you can select the rate limits that you like to apply.
Applying rate limits to client keys
You can also specify a custom rate limits for each client key. When creating new client key or updating an existing one, from the Rate limiting tab you can select the rate limits that you like to apply.