Design Layered Security Protections for a Public Website

Quick Overview

A security system design question asking how you would protect a public website, from DNS and the CDN edge down to application code, data and infrastructure. It tests threat modeling, defenses against denial of service, bots, account takeover and injection, secure session handling, least-privilege infrastructure, and detection and incident response.

Design Layered Security Protections for a Public Website

Company: Roblox

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

You are asked how you would protect a website: which threats it faces and which security controls you would put in place, from the network edge down to the application, its data and the infrastructure it runs on. The reported prompt is only this question, so the kind of site, what it stores and which threats matter most are open: settle them with the interviewer before designing. ```hint Follow a request inward Trace one request from the browser through DNS, the edge, the load balancer, the application servers and the database, and ask what an attacker could do at each hop. ``` ```hint Different attacks, different layers A network flood, automated abuse of a legitimate endpoint such as login, and a crafted input that reaches a database query are stopped in different places. Decide which layer owns each. ``` ### Clarifying Questions - What does the site do: serve static content, host user accounts and logins, take payments, accept user-generated content, expose a public API? - What data must be protected (credentials, personal data, payment details), and are there compliance obligations? - Which threats worry the team most: account takeover, scraping and bots, denial of service, data breach, defacement? - What does the current architecture look like: is there a CDN in front, how many services and databases, which cloud? - Who operates the site, and how quickly must an attack be detected and contained? ### What a Strong Answer Covers - A threat model first: assets, attackers and entry points, ranked by impact and likelihood - Edge protections: TLS with HSTS, a CDN that absorbs floods, an origin that cannot be reached around the edge, a web application firewall, rate limiting and bot management - Authentication and session security: password hashing, multi-factor authentication, defenses against credential stuffing, secure cookies, CSRF protection and safe password reset - Application-layer defenses against injection, cross-site scripting, SSRF and broken access control, plus security headers such as a Content Security Policy - Data protection and infrastructure hardening: encryption, least-privilege access, network segmentation, secrets management, patching and supply-chain controls - Detection and response: centralized security logs, alerts, an incident runbook and tested backups, with the trade-offs between security and user friction ### Follow-up Questions - A credential-stuffing attack hits the login endpoint from thousands of residential IP addresses. How do you stop it without locking out real users? - A flood of expensive search requests looks like normal traffic and gets past the network-level protections. How do you keep the site up? - An attacker finds a stored cross-site scripting bug in user profiles. What limits the damage before the fix ships, and what prevents the next one? - A database backup leaks. What in your design keeps passwords and personal data from being exposed?

Overview: A security system design question asking how you would protect a public website, from DNS and the CDN edge down to application code, data and infrastructure. It tests threat modeling, defenses against denial of service, bots, account takeover and injection, secure session handling, least-privilege infrastructure, and detection and incident response.

Read the full Roblox Software Engineer interview experience this question came from

Roblox logo
Roblox
Nov 6, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0

You are asked how you would protect a website: which threats it faces and which security controls you would put in place, from the network edge down to the application, its data and the infrastructure it runs on. The reported prompt is only this question, so the kind of site, what it stores and which threats matter most are open: settle them with the interviewer before designing.

Clarifying Questions Guidance

  • What does the site do: serve static content, host user accounts and logins, take payments, accept user-generated content, expose a public API?
  • What data must be protected (credentials, personal data, payment details), and are there compliance obligations?
  • Which threats worry the team most: account takeover, scraping and bots, denial of service, data breach, defacement?
  • What does the current architecture look like: is there a CDN in front, how many services and databases, which cloud?
  • Who operates the site, and how quickly must an attack be detected and contained?

What a Strong Answer Covers Guidance

  • A threat model first: assets, attackers and entry points, ranked by impact and likelihood
  • Edge protections: TLS with HSTS, a CDN that absorbs floods, an origin that cannot be reached around the edge, a web application firewall, rate limiting and bot management
  • Authentication and session security: password hashing, multi-factor authentication, defenses against credential stuffing, secure cookies, CSRF protection and safe password reset
  • Application-layer defenses against injection, cross-site scripting, SSRF and broken access control, plus security headers such as a Content Security Policy
  • Data protection and infrastructure hardening: encryption, least-privilege access, network segmentation, secrets management, patching and supply-chain controls
  • Detection and response: centralized security logs, alerts, an incident runbook and tested backups, with the trade-offs between security and user friction

Follow-up Questions Guidance

  • A credential-stuffing attack hits the login endpoint from thousands of residential IP addresses. How do you stop it without locking out real users?
  • A flood of expensive search requests looks like normal traffic and gets past the network-level protections. How do you keep the site up?
  • An attacker finds a stored cross-site scripting bug in user profiles. What limits the damage before the fix ships, and what prevents the next one?
  • A database backup leaks. What in your design keeps passwords and personal data from being exposed?