Feature deep dive

Geographic Traffic Distribution by country

See where clients hit your edge — Top Countries ranked by request volume and a live world map — without leaving the WSL Proxy admin dashboard.

2-minute feature video · Dashboard Overview · IP2Location on the OpenResty hot path

WSL Proxy Geographic Traffic Distribution panel with world map choropleth and Top Countries list (United Kingdom, United States, Switzerland, and more)
Geographic Traffic Distribution on the WSL Proxy dashboard — choropleth heat and Top Countries.

Watch on YouTube · Full product intro (20 min)

Why geo traffic belongs in the control plane

Edge operators already know how much traffic they serve. The harder question is from where. Country-level demand drives WAF geo rules, capacity planning, CDN POP placement, and abuse response. Shipping that view into a third-party analytics product means another hop, another identity, and another delay.

WSLProxy records country on the request path and surfaces it next to the same Overview KPIs you already use — requests, bandwidth, errors, success rate — so geo context stays inside the gateway control plane.

What the dashboard shows

Top Countries Ranked list of ISO countries with request counts for the selected window (for example last 24 hours).
World choropleth Countries shaded by volume so hot regions stand out at a glance — useful when Top Countries is long or skewed.
Overview context The geo panel sits under the same Overview strip as Requests, Bandwidth, Errors, Active Domains, and Success Rate.
Close view of WSL Proxy Geographic Traffic Distribution map and Top Countries
Same production dashboard view used in the 2-minute walkthrough.

How it works on the hot path

  1. Client IP — typically ngx.var.remote_addr (respect real-IP / trusted proxy config when behind Cloudflare or another edge).
  2. IP2Locationgeo_lookup / log_handler open the binary DB from settings.ip2location_path (with on-disk fallbacks to the ansible install path under OpenResty).
  3. Normalize — IP2Location’s UK is mapped to ISO GB so world-atlas polygons light correctly.
  4. Aggregate — counts land in the traffic_stats shared dict for hourly / rolling windows.
  5. API → UI — authenticated /api/traffic/stats feeds GeoTrafficMap in React Admin and the Next.js dashboard.
Access logs also emit $geo_country. If you ever see INVALIDDATABASEFILE, the configured DB path is missing — point ip2location_path at the real BIN (or keep the /tmp symlink ansible now maintains).

Platform features this sits beside

Geographic Traffic Distribution is one slice of the same live-config edge platform:

Operate it in production

Try it

https://wslproxy.org
https://youtu.be/4G_YPYj3J3k
https://github.com/bwalia/wslproxy

Open the admin Overview tab on your POP (for example lon1.pop0.uk), confirm Top Countries fills after traffic, and share the map with whoever owns abuse and capacity.