What happens when compliance becomes part of System Design, rather than a checklist after deployment?
Today, system designers must operate within a regulatory environment that shapes technical decisions from the earliest stages. Frameworks like
These regulations also affect how businesses operate. Platforms that embed compliance into their systems are better positioned to earn user trust, scale across regions, and pass vendor assessments. Compliance is no longer separate from design. It is shaping the structure, behavior, and resilience of systems.
This newsletter dives into how GDPR, HIPAA, and SOC 2 reshape System Design. We’ll cover their core requirements, impact on architecture, and the trade-offs system designers face to ensure compliance, reliability, and speed.
To begin, let's break down each regulation’s demands and how its focus areas differ.
Before diving into design patterns and architectural solutions, it’s essential to understand the requirements of each regulation. While GDPR, HIPAA, and SOC 2 share a focus on safeguarding data and building trust, each targets different domains, use cases, and risk models. System designers must know these distinctions early in the design life cycle, as they directly influence data handling, storage models, and access policies.
General Data Protection Regulation (GDPR), a privacy regulation introduced by the European Union (EU), governs how personal data is collected, stored, and processed. Its scope applies to companies based in the EU and any organization handling EU citizens’ data. This extraterritorial reach makes it a global concern for most internet-facing platforms.
At a high level, GDPR requires systems to support:
Purpose limitation: Use personal data only for the specific, clearly defined purposes communicated to the user during collection.
Lawfulness, fairness, and transparency: Ensure that data is processed legally, users are informed about how their data is used, and no hidden or unfair practices are involved.
Data minimization: Collect only the data needed for a specific purpose.
Integrity and confidentiality: Protect personal data against unauthorized access, accidental loss, or destruction through appropriate technical and organizational measures.
Accuracy: Keep personal data accurate and up to date. Incorrect or outdated data must be corrected or deleted without delay.
Accountability: Be able to demonstrate compliance with GDPR principles through policies, documentation, audits, and System Design choices.
Storage limitation: Keep personal data only as long as necessary for the stated purpose. Delete or anonymize data when it’s no longer needed.
The following image shows the seven rules of GDPR:
These requirements push system designers to build support for things like updating or deleting user data, tracking user consent, and storing data to make removing or exporting specific pieces easy when needed.
GDPR fines can be substantial. For instance, Meta was fined a record-breaking
HIPAA is a U.S. law that applies to health care providers, insurers, and health tech companies. Its focus is safeguarding protected health information (PHI), including any identifiable medical data.
To comply with HIPAA, systems handling PHI must be built with specific safeguards in mind. Some of the core safeguards include:
Access and audit controls: Systems must log who accessed PHI, when, and why.
Data integrity and breach detection: Systems must detect and respond to unauthorized access or tampering.
Notification workflows: In case of a breach, systems must support alerting regulators and affected individuals.
Designing for HIPAA compliance often requires fine-grained access control, immutable audit logs, and architecture that separates sensitive health data from general application logic.
SOC 2 is not a law but a framework developed by the
What makes SOC 2 particularly relevant is its growing use as a baseline for trust in
Each of the five trust service criteria represents a specific area where systems must demonstrate strong and reliable controls:
Security: Protect systems from unauthorized access through authentication, firewalls, and intrusion detection.
Availability: Ensure systems remain operational as committed in
Confidentiality: Safeguard sensitive data through encryption, access restrictions, and masking.
Processing integrity: Ensure systems operate reliably and process data as intended, without being altered by unauthorized actions or errors.
Privacy: Ensure personal information is collected, used, retained, and disclosed in line with the organization’s privacy notice and relevant regulations.
SOC 2 audits are more challenging in remote-first and
Unlike GDPR or HIPAA, SOC 2 allows flexibility in implementation. However, it requires extensive documentation, internal controls, monitoring pipelines, and policy enforcement. It often influences System Design by encouraging modular service boundaries, secure CI/CD pipelines, and real-time observability.
The following table shows the different scopes, mandates, and industries each regulation targets.
Category | GDPR | HIPAA | SOC 2 |
Primary goal | Protect personal data and enforce user rights | Safeguard health information and ensure patient trust | Establish trust in systems through security and reliability |
Data types covered | Personal data (e.g., name, location, IP, ID) | Protected Health Information (PHI) | Customer data, logs, configs, and operational metadata |
Key mandates | Consent, data erasure, portability, and minimization | Access control, audit trails, breach notification | Security, availability, confidentiality, integrity, privacy |
Breach notification | Required within 72 hours | Required within 60 days | Not mandatory, but expected as part of incident response |
Impact on System Design | Consent flows, deletion workflows, and regional data handling | Immutable logs, fine-grained access control, breach workflows | Monitoring pipelines, CI/CD controls, and policy enforcement |
A system architect is designing a new platform that handles personal data for users globally. Which GDPR mandate directly influences the need for automated deletion workflows?
Data minimization
Explicit consent
Right to erasure
Data portability
We have learned the foundational requirements for building systems in light of GDPR, HIPAA, and SOC 2. Let’s investigate how these translate into concrete architectural decisions, considering the regulatory mandates.
Understanding regulations is only the starting point. GDPR, HIPAA, and SOC 2 shape how systems manage data, enforce controls, and define operational boundaries. Their impact extends deep into architecture, affecting how data is retained, who can access it, where it resides, and how it is secured. Whether you build health care software or cloud platforms, these frameworks influence decisions across the stack. Let’s explain how they affect the following four key areas in System Design:
Data life cycle management
Access control and auditability
Geographic data residency and isolation
Encryption and security by design
Let’s start with data life cycle management
Imagine data as a living entity within a system. Compliance mandates define its birth, life, and even its lawful demise. The “right to be forgotten,” a cornerstone of GDPR, demands that systems implement enforceable data retention and deletion workflows. This means architects can no longer simply store data indefinitely. They must design automated or semi-automated processes for identifying, archiving, and securely erasing personal data upon request or after predefined periods. For instance, a system might use a time-based data expiration policy or a user-driven deletion request for personal profiles.
However, not all data can be removed on demand. For instance, immutable audit logs must be preserved for audit or legal purposes. This introduces two parallel paths for managing data: mutable stores that support user-driven deletion and immutable logs that guarantee traceability. The design must keep both in sync without compromising compliance. For example, a user profile might be deleted from an active database, while a record of that deletion event remains permanently in an audit log.
Furthermore, tagging and tracing data across microservices becomes paramount in complex microservice architectures. When a user requests data deletion, a system must identify all instances of that user’s data across various services, databases, and caches. Implementing robust data lineage solutions, perhaps using unique identifiers or metadata tagging, allows for comprehensive tracking and ensures no data is left behind, satisfying regulatory obligations.
Who can see what, and when? This fundamental security question is heavily influenced by compliance. Modern systems require designing for fine-grained role-based access control (RBAC) or attribute-based access control (ABAC) models. Instead of simple user roles, access might depend on specific attributes of the user, the data, or even the context of the request.
For instance, only a specifically authorized clinician accessing a secure network might be granted access to sensitive patient health information. This distinction is illustrated in the comparison between RBAC and ABAC. RBAC maps users to predefined roles like “Clinician” or “Admin,” with each role assigned fixed permissions, making managing it straightforward but less adaptable to dynamic conditions. Conversely, ABAC enables more granular and context-aware control by evaluating multiple attributes (such as user role, location, device type, data sensitivity, and access time) before granting access.
To balance simplicity and flexibility, systems often combine both models, enforced through identity-aware proxies, service meshes like Istio, or policy engines such as
Immutable audit logs are crucial for proving who performed what action and when. Platforms like AWS CloudTrail or dedicated Kafka log sinks provide tamper-resistant records of every system access, change, or administrative action. These logs are crucial for demonstrating compliance to auditors and for forensic analysis in case of a security incident or breach.
Beyond initial design, ongoing vigilance is key. This includes periodic access reviews, where permissions are regularly examined and adjusted. Concepts like
In our interconnected world, data often crosses borders, yet regulations frequently mandate its physical location. This creates a tension between multi-region data distribution for availability and strict localization requirements, particularly under GDPR. While spreading data across multiple data centers enhances resilience, GDPR may require the personal data of EU citizens to remain within the EU.
To address this, architects employ specific design patterns like region-aware data sharding. This involves partitioning databases or storage such that data belonging to users from a specific geographic region resides only in data centers within that region. Geo-tagged resource policies can enforce where compute resources process certain data types, ensuring compliance with data residency rules. For example, a serverless function processing EU customer data might only be allowed to run in an EU region.
The image illustrates a data architecture where an application routes sensitive “regulated data” to dedicated “InCountry” storage to meet legal compliance requirements, while “all other data” is directed to a general-purpose database to maintain operational flexibility.
Even content delivery networks (CDNs) are not exempt. CDN compliance may involve setting up IP filtering or making sure regional caches only store content allowed in specific regions, avoiding accidental data transfer across restricted borders. Designing for residency means striking a balance. Systems must be available worldwide but also respect location-specific restrictions on storage and processing. This often calls for localized deployments combined with clear data flow isolation.
Encryption is foundational to data protection, yet compliance pushes its implementation beyond basic measures. While
Consider end-to-end encryption in message buses like Kafka or gRPC. Data remains encrypted as it moves between microservices, even if it traverses internal networks. This prevents sensitive information from being exposed at any point during internal data transfer.
The following illustration shows how encryption is preserved end-to-end between the sender and receiver:
Furthermore, advanced techniques like
The following illustration demonstrates how personal information is transformed using a key into a pseudonymized code:
Understanding these core architectural shifts highlights a deeper need to move beyond reactive fixes and design systems where compliance is part of the foundation. This requires applying patterns that make compliance a structural aspect of System Design.
The real goal of compliance is to build systems that respect privacy, ensure integrity, and minimize risk by default. This requires applying regulatory principles directly to the system’s structure. Over time, certain design patterns have emerged that align naturally with GDPR, HIPAA, and SOC 2 goals. These patterns help teams embed compliance into the fabric of their systems.
Privacy by design at service boundaries: Considers
Zero-trust architecture: The
Instead of allowing any service to access a specific database, Istio can be configured to only allow the service that requires access, and even further restrict the operations it can perform on the database.
Secure enclaves and data vaults: Provides robust isolation for highly sensitive information such as PHI or
Data access gateways with policy as code: Queries pass through a gateway that enforces access rules defined in code. Tools like
The design principle where “no user or device, whether internal or external, is automatically trusted” is a core tenet of what compliance-informed System Design pattern?
Privacy by design
Zero-trust architecture
Data access gateways
Secure enclaves and data vaults
By adopting these patterns, system designers can turn compliance from a constraint into an architectural advantage. These practices improve isolation, simplify audits, and reduce unintended exposure, while also building systems that are easier to scale and secure. However, achieving compliance often comes with trade-offs that must be carefully managed.
Achieving compliance is a strategic imperative, but it rarely comes without architectural and operational considerations. Architects must navigate a landscape of choices, where meeting one regulatory demand might impact another aspect of the system. Understanding these trade-offs is essential for making informed decisions and building compliant and practical systems. Let’s discuss some of the core trade-offs as follows:
Performance degradation due to extensive audit trails: Generating, storing, and processing comprehensive, immutable logs can introduce latency and consume significant computational resources, requiring optimized logging pipelines.
Data portability APIs: Implementing robust APIs for users to extract their data, as GDPR mandates, demands considerable engineering effort for data aggregation, formatting, and secure transfer.
Cost vs. compliance: Achieving strong isolation for each customer’s data in multi-tenant systems significantly increases infrastructure costs and management overhead, requiring a balance between compliance needs and financial implications.
The average data breach cost reached a staggering
Balancing observability with data overcollection: While monitoring is crucial, collecting excessive personal or sensitive data for observability can inadvertently expand regulatory scope, increasing the compliance burden; careful data masking or aggregation is often needed to prevent this.
Understanding these inherent trade-offs allows architects to engage in realistic planning and decision-making, optimizing for compliance without sacrificing critical aspects of system functionality or cost effectiveness.
Let’s look at a real-world implementation where leading companies have successfully navigated compliance challenges.
Seeing compliance patterns in production delivers powerful lessons. Let us review how Stripe, Epic Systems, and SOC 2-focused startups have embodied these practices in real systems:
Stripe: It uses
Apple (Privacy by design for GDPR compliance): Apple deeply embeds
Google Cloud (Comprehensive HIPAA-compliant infrastructure): Google Cloud offers a
Amazon Web Services (AWS) and Microsoft Azure (SOC 2 Compliance for Cloud Platforms): AWS and Microsoft Azure maintain
These examples highlight how major technology companies integrate compliance as a core part of their platform design. This approach enables their customers to build compliant applications on a secure and trusted foundation.
Compliance is not a static audit but an ongoing journey integrated into daily development practices through proactive organizational effort. One powerful approach centers on policy as code, which defines compliance rules in machine-readable code using tools like Rego or Sentinel. Its integration into continuous integration pipelines provides automated checks, preventing noncompliant configurations from reaching production.
Beyond code-based policies, compliance observability proves vital for understanding compliance status in real time. Internal dashboards dedicated to audit logs, access tracing, and data flow maps achieve this, enabling proactive monitoring and rapid response.
Furthermore, shifting left integrates security and privacy early in the development life cycle by conducting threat modeling, implementing secure defaults, and incorporating Privacy Impact Assessments (PIAs) into pull request reviews. This significantly reduces costly rework.
What is the primary purpose of compliance observability within an organization?
To provide real-time understanding of compliance status and data flows
To perform one-time, annual compliance audits
To replace the need for any manual security checks
To encrypt all data at rest and in transit automatically
Compliance is not a constraint that follows engineering. It is now a foundational part of how systems are designed. Regulations such as GDPR, HIPAA, and SOC 2 shape how data moves, how services interact, and how users trust what is built. They bring clarity to access patterns, force better defaults, and elevate the importance of transparency.
Systems that account for these expectations early are easier to secure, scale, and govern. Compliance encourages modular design, observability, and strong isolation boundaries — all of which improve system health beyond regulatory needs.
As technology becomes more embedded in critical decisions and everyday lives, trust is no longer a side effect of good systems. Ask yourself this: If trust is now something we must design for, are your systems ready to carry that responsibility?