REST API Rate Limiting via Intermediary Service

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Standard REST API systems lack a rate limiting mechanism, allowing client devices to saturate servers with computationally expensive requests, which reduces server responsiveness and performance.

Innovation Solution

Implementing a rate limiting method in REST API servers that allows for customizable rate limit rules based on users, roles, and devices, where requests are analyzed to match predefined rules, and responses include headers indicating rate limiting information or errors, with a background process updating count and violation records.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If rate limiting is implemented in REST API servers, then server performance and responsiveness are improved, but device complexity and implementation difficulty increase

Engineering Contradiction:
Improveserver responsivenessVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces a rate limiting service as an intermediary component that sits between the REST API server and client devices. This service handles rate limit checking, rule evaluation, and violation tracking separately from the core API logic. The server can offload rate limiting decisions to this dedicated service, improving its own responsiveness while maintaining comprehensive rate limiting capabilities through modular architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The rate limiting functionality is segmented into distinct components: rate limit rules definition, request analysis, rule matching, violation tracking, and response generation. This segmentation allows each component to be optimized independently and enables the system to handle rate limiting without burdening the entire REST API server, thus improving overall server performance while maintaining manageable complexity through clear separation of concerns.

Inventive Principle:
Principle #1Segmentation

2Adaptability or versatility

If customizable rate limit rules are implemented for different users and roles, then user experience and fairness are improved, but device complexity and configuration difficulty increase

Engineering Contradiction:
Improverate limiting customizationVSAvoidconfiguration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The rate limiting system implements dynamic rule configuration where rate limit parameters such as request thresholds, time windows, and applicable user roles can be modified without restarting the service. Administrators can add, remove, or adjust rate limit rules based on changing requirements, and the system automatically applies these changes to ongoing operations. This dynamic adaptability allows the system to accommodate different user needs and scenarios while maintaining a unified configuration management approach.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The rate limiting service provides universal functionality that can serve multiple purposes: protecting against abuse, prioritizing certain users, implementing service level agreements, and managing resource allocation. A single rate limiting infrastructure supports various rate limit rules针对不同用户、角色和API资源,eliminating the need for separate systems for each use case and reducing overall configuration complexity through a unified approach.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If rate limit checking is performed for every request, then abuse prevention is improved, but processing time and computational overhead increase

Engineering Contradiction:
Improveabuse preventionVSAvoidrequest processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by pre-evaluating rate limit rules and maintaining ready-to-use rate limit states for each user and API resource. When a request arrives, the system checks against pre-computed rate limit thresholds and current violation counts rather than performing full rule evaluation from scratch. This preliminary preparation significantly reduces the time required for rate limit checking while maintaining comprehensive abuse prevention coverage.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The rate limiting implementation applies local optimization by caching rate limit decisions and violation counts at the user-resource level. Once a rate limit rule is matched and the violation count is determined for a specific user-resource combination, this information is stored and reused for subsequent requests from the same user to the same resource. This local caching eliminates redundant computation and reduces processing time for repeated requests while maintaining accurate abuse prevention.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11159649B2Systems and methods of rate limiting for a representational state transfer (REST) application programming interface (API)
Publication Date: 2021.10.26 SERVICENOW INC
  • US11159649B2 patent drawing
  • US11159649B2 patent drawing
  • US11159649B2 patent drawing

AI summary

The present disclosure relates to systems and methods of implementing rate limiting in a representational state transfer (REST) application programming interface (API) system. A method of operating an instance of a REST API server, includes: receiving a REST API request that matches a rate limit rule associated with the instance of the REST API server; preparing a REST API response that includes rate limiting response headers. The method includes determining whether a rate limit violation exists that corresponds to the rate limit rule and, when it does, adding an error message to the REST API response. Otherwise, the REST API request is fulfilled and corresponding data is added to the REST API response. The method includes sending the REST API response including the rate limiting response headers and either the error message or the corresponding data.