Phase Flow in Peakhour.IO¶
This diagram illustrates the order and flow of phases in Peakhour.IO's request processing pipeline.
graph TD
A[Incoming Request] --> B(Request Rewrite)
B --> C(URL Config)
C --> D(Firewall)
D --> E(Rate Limit Request)
E --> WAF(WAF)
WAF --> EL(Rate Limit Request Late)
EL --> BR(Bulk Redirect)
BR --> F(Request Headers)
F --> G(Load Balance)
G --> H[Origin Processing]
H --> I(Response Headers)
I --> J(Rate Limit Response)
J --> K[Outgoing Response]
style A fill:#f9f,stroke:#333,stroke-width:2px
style K fill:#9ff,stroke:#333,stroke-width:2px
style H fill:#ff9,stroke:#333,stroke-width:2px
Phase Descriptions¶
- Request Rewrite: Modifies the request URI.
- URL Config: Applies configuration overrides based on the URL.
- Firewall: Allows, blocks, challenges, or logs requests based on security rules.
- Rate Limit Request: Applies rate limiting before the WAF.
- WAF: Analyzes the request for threats against the OWASP Core Rule Set.
- Rate Limit Request Late: Applies rate limiting after the WAF has run, allowing for decisions based on WAF results.
- Bulk Redirect: Manages large-scale URL redirects.
- Request Headers: Modifies or sets headers in the incoming request.
- Load Balance: Distributes incoming requests across multiple origin servers.
- Origin Processing: The request is sent to and handled by the origin server.
- Response Headers: Modifies or sets headers in the outgoing response from the origin.
- Rate Limit Response: Applies rate limiting based on the response from the origin.
Peakhour-Specific Fields¶
Location Field¶
The peakhour.server.name
field contains the POP server name that handled the request. This field enables origin selection based on region.
Example usage:
Action:
Proxy Field¶
The peakhour.client.proxy
field detects if the client is using a residential proxy.
Example usage:
Action:
Firewall Challenge¶
The firewall phase includes a challenge action for potentially suspicious requests:
Action:
Dynamic Headers¶
Dynamic headers set header values using Wirefilter expressions.
Example:
This sets the X-User-Location
header with the country code and AS number of the requesting IP.