Skip to content
George ProdromouAI, hosting and technical SEO
All work
Live

ScaleShield

ScaleShield handles incoming requests to sites hosted on G7Cloud.

I develop and operate the service.

Why I built it

The sites I host need different traffic rules. I wanted to give each owner control over those rules and keep the time spent checking an ordinary request small.

How it fits together

  1. RequestTLS terminated
  2. Lists and WAFIP, network, rules, paths
  3. Bots and limitsscoring, challenges, rate limits
  4. Cache or originper-site settings

Implementation

One request pipeline
Each request passes through a Lua pipeline: routing by host, allow and deny lists by IP and network, WAF rules, path rules, rate limits, bot scoring and challenges, then the cache or the origin.
Configuration without round trips
Rules and settings are read from a three-tier cache inside the worker, with a tight timeout on Redis, so a request does not wait on the network for its configuration.
Rules site owners control
Each site can have its own rules to block, allow, challenge or rate-limit traffic.
Updating the firewall
A new edge image is compared with the running version before it rolls out, and the fleet can go back to the last good image in one step.
The ScaleShield home page
scaleshield.io

Stack

  • OpenResty
  • nginx
  • Lua
  • Redis
  • PostgreSQL
  • TLS
  • HTTP/2

More work