Waf Architecture Diagram

Published
Length
3 min read

Luis Felipe Dias

All posts

To build a waf architecture diagram, map the path from public users to your backend servers. Place the web firewall between your DNS service and the load balancer to inspect incoming requests. Most teams start this setup by drawing public entry points and basic routing rules. When internal roles or permissions are too broad, engineers can bypass this perimeter path entirely. Direct internal sessions to databases or servers skip the firewall and leave no central audit log. How a waf architectur

Zero Trust Architecture + AWS WAF: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

To build a waf architecture diagram, map the path from public users to your backend servers. Place the web firewall between your DNS service and the load balancer to inspect incoming requests. Most teams start this setup by drawing public entry points and basic routing rules. When internal roles or permissions are too broad, engineers can bypass this perimeter path entirely. Direct internal sessions to databases or servers skip the firewall and leave no central audit log.

How a waf architecture diagram maps traffic flow

A standard diagram shows how outside traffic reaches your web apps. The flow starts when a user sends a web request from a browser. The DNS service reads the domain name and points the user to the edge network. Next, the content delivery network caches static files and drops basic network floods. Traffic then hits the web firewall for deep packet checks.

The firewall checks each request against a list of security rules. It looks for SQL injection strings, cross-site scripts, and bad bot patterns. If a request matches a block rule, the firewall drops it right away. Clean traffic moves forward to the load balancer inside your private network. The load balancer spreads the requests across healthy app servers. Finally, the app servers read or write data in the backend database.

Choosing a deployment mode for your layout

Teams usually draw one of three firewall layouts based on their hosting setup. A cloud-hosted firewall sits at the edge and needs only a simple DNS change. An inline appliance sits directly inside your virtual network between the router and app servers. All traffic must pass through this inline node before reaching any internal host.

Some teams use an out-of-band layout that reads a copy of network traffic. This mode alerts the team about bad requests but cannot block live attacks in real time. Each layout needs clear network rules so attackers cannot send requests straight to the origin IP. You must lock down the load balancer so it only accepts traffic from the firewall.

Zero Trust Architecture + AWS WAF: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What perimeter firewalls solve and what they miss

A web firewall excels at stopping automated attacks from public internet users. It blocks known exploit patterns before they touch your web app code. It also filters out bad bots and limits how fast a single IP can send requests. This perimeter check keeps public web apps stable during high-volume traffic spikes.

Still, a perimeter diagram only covers traffic coming through the front door. It does not check what engineers, scripts, or internal services do once they log in. Network rules decide who enters the network, not what individual queries or commands do in flight. When a developer runs a database query or server command, the web firewall is not involved. If that user has broad role permissions, a single mistake can drop a table or expose data. Relying only on an edge firewall leaves internal database sessions and admin actions unchecked. Even if data masking rewrites emails, phone numbers, card numbers, or national IDs in web apps, raw database queries bypass those app rules.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Where does the firewall sit in a waf architecture diagram?

It sits between the public edge network and your internal load balancer. This placement lets it inspect and filter all web requests before they reach your app servers.

How do you stop users from bypassing the web firewall?

You configure network rules on your load balancer to allow traffic only from the firewall IP list. You also hide the origin server IP addresses from public DNS records.

Does a web firewall protect against internal database mistakes?

No, a web firewall only inspects incoming HTTP and HTTPS traffic from external clients. It does not inspect direct database sessions, SSH commands, or internal admin queries run by your team.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.