Problem Statement: Security From Inside the Runtime
Frames RASP as an in-process protection plane that sees data the perimeter never can, and separates detection latency from application latency.
Problem statement
Design a Runtime Application Self-Protection (RASP) platform that ships a lightweight agent inside each application process, observes security-relevant function calls and data flows as they happen, evaluates them against policy, and either blocks, sanitizes, or alerts on malicious behavior in real time. The platform must also collect interception telemetry, tune rules centrally, and roll out detection logic safely across a large fleet of application instances.
A Web Application Firewall sits outside the process and inspects raw HTTP before it is parsed. It cannot see that a value the user submitted was deserialized, stored, later read back, and concatenated into a query. A Static Analysis Security Testing (SAST) tool reads source but never knows which paths actually execute in production. RASP closes both gaps because it runs where the data and the dangerous sinks meet: inside the application's own memory and call graph.
Why the problem is distinctive
The design tension that defines RASP is not detection accuracy alone. It is the conflict between being on the critical path of every request and being allowed to add almost no latency or memory. If the agent adds 40 milliseconds to a 60-millisecond endpoint, the security team has degraded the product it was hired to protect. Therefore the architecture must separate the cheap synchronous decision (block or allow, on a microsecond budget) from the expensive asynchronous work (correlation, machine scoring, evidence upload) that happens off the request path.
This answer treats the agent as a safety-critical dependency. A crash or runaway loop in the protection agent must never take down the business application. That means the agent needs its own watchdogs, CPU and memory budgets, a kill switch, and a fail-open or fail-closed policy chosen deliberately per environment.
The four planes
- Instrumentation plane: bytecode or CLR hooking that taps security-relevant sinks and sources without changing program semantics.
- Decision plane: taint propagation plus rule and anomaly evaluation that returns block, allow, monitor, or sanitize within a strict latency budget.
- Control plane: policy distribution, rule versioning, rollout rings, allowlist management, and kill switch.
- Telemetry plane: event collection, deduplication, aggregation, analytics dashboards, and feedback into rule tuning.
A strong answer keeps these planes separate. The decision plane must degrade without weakening protection semantics, and the telemetry plane must never block a request because a broker is slow.
Public baseline versus design assumptions
Publicly available references show the category is mature. Contrast Security popularized the Java agent RASP model. Dynatrace ships a single OneAgent that performs code-module injection across languages. Baidu open-sourced OpenRASP, a PHP/JVM agent that hooks sinks rather than tracking every taint. These are cited as context. Unless a number is tied to a published source, every scale figure, latency target, and SLO below is an explicit design assumption.
Key Highlights
- •RASP sees data flow inside the process, which a perimeter WAF and a static SAST tool both miss.
- •The defining trade-off is on-path decision latency versus application latency; separate cheap synchronous verdicts from expensive async analytics.
- •The agent is a safety-critical dependency and needs its own budgets, watchdog, and kill switch.
- •Four planes: instrumentation, decision, control, and telemetry.
- •Every uncited number in this answer is an explicit design assumption, not a vendor claim.
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "I will separate the fast synchronous verdict from the slower asynchronous analysis before choosing any technology."
- "Before picking hooking mechanisms, let me define which calls are on the critical path and which are only observed."