Skip to content

Phases in Peakhour.IO#

Peakhour.IO offers flexible rules for adjusting the runtime behaviour of requests and responses through distinct execution points termed phases.

Using these phases, you can alter the platform's behaviour at specific junctures in the request/response cycle. Some phases evaluate every rule, while others cease after identifying a match.

Phases#

Request Rewrite#

Modifications made during this phase are visible to subsequent phases.

Use: Adjust URLs before they're processed, like converting all requests to lowercase.

URL Configuration#

This phase modifies request parameters when evaluating a URL. Processing halts upon finding a match.

Example: Redirecting old product URLs to new ones without changing the site's structure.

Firewall#

Allows users to block requests based on specified conditions. Processing concludes once a match is identified.

Use: Blocking IP addresses known for malicious activities.

Rate Limit Request#

During this phase, the request's rate limiting is assessed. Users can allocate a client to a specific rate limiting zone and determine if a request meets the zone's criteria.

Example: Limiting the number of login attempts within a minute to prevent brute-force attacks.

Rate Limit Response#

This phase functions during the response phase. Clients can be placed in a specific rate limiting zone based on the initial response.

Use: Restricting bandwidth for users who download large files to ensure fair usage.

Request Headers#

You can modify request headers during this phase.

Example: Adding a custom header to track the origin of a request.

Load Balance#

Allows users to distribute incoming network traffic across multiple servers.

Use: Distributing incoming user requests across three servers to balance the load and prevent any single server from getting overwhelmed.

Response Headers#

Modify headers in the response phase through this phase.

Example: Setting security-related headers like Strict-Transport-Security to improve the site's security posture.