← Okta Interview Insights

Okta·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

System design round at Okta for a software engineer role, focused entirely on building a large-scale distributed metrics backend. It was a deep, sprawling question and I felt like I was playing catch-up for most of it.

Questions Asked (3)

Q1

Design a distributed backend for storing and querying time-series metrics at large scale, supporting high-volume ingestion, label-based queries, long-term retention, and multi-tenant isolation.

System DesignTechnical Trade-offsData Modeling
Author's notes

This was the whole interview, basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (ingestion rate, query patterns, retention, tenant count) to scope the design. Then propose a layered architecture: a write-optimized ingestion pipeline, a columnar time-series storage engine with label indexing, and a query layer with caching and downsampling. Emphasize trade-offs around consistency, cost, and isolation, and tie choices back to Okta's identity/security context.

Pro tip: Anchor your design around a proven open-source time-series database (e.g., Prometheus, Thanos, Cortex, or VictoriaMetrics) and explain how you'd extend it for multi-tenancy and Okta-specific needs, rather than designing from scratch. This shows pragmatism and deep familiarity with real-world systems.

1. Clarify Requirements and Scale

Ask about ingestion volume (e.g., millions of samples/sec), query types (range, instant, aggregation), retention periods, tenant count, and isolation requirements. Establish SLAs for latency and durability.

2. Design Ingestion Pipeline

Propose a distributed write path: ingestion gateways for auth/rate-limiting, a message queue (e.g., Kafka) for buffering and decoupling, and stream processors for validation, enrichment, and routing to storage shards.

3. Design Storage and Indexing

Choose a time-series storage engine (e.g., TSDB with columnar compression) and design label-based indexing (inverted index or series map). Discuss sharding by tenant/time, replication for durability, and tiered storage for long-term retention.

4. Design Query Layer

Build a query service that parses label queries, prunes shards, and executes distributed scans with aggregation pushdown. Add caching (query results, series metadata) and downsampling for long-range queries.

5. Address Multi-Tenancy and Trade-offs

Explain isolation models (shared-nothing vs. shared storage with tenant IDs), resource quotas, and security. Discuss trade-offs: consistency vs. availability, cost vs. performance, and operational complexity.

Key Points to Mention

  • Time-series data model: metric name, labels (key-value pairs), timestamp, value; cardinality challenges with high-dimensional labels.
  • Write path optimizations: batching, compression (e.g., Gorilla, delta-of-delta), and append-only storage for high throughput.
  • Label-based indexing: inverted index for fast series lookup, and strategies to handle high cardinality (e.g., sharding by label hash).
  • Retention and downsampling: tiered storage (hot/warm/cold), rollups, and TTL policies to balance cost and query performance.
  • Multi-tenant isolation: tenant ID in all data paths, per-tenant quotas, and optional physical isolation for compliance.
  • Query execution: distributed query planning, predicate pushdown, and caching to meet latency SLAs.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle the query path, including fan-out across shards, deduplication of replicated samples, and enforcing cross-tenant security?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Talked through a querier layer that fans out to store gateways per shard and merges results.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the query path requirements and constraints, then walk through the fan-out, deduplication, and security layers in a logical order. Emphasize trade-offs and how you would validate the design with metrics and testing.

Pro tip: Highlight that deduplication should happen as early as possible in the query pipeline to reduce network and processing overhead, and that cross-tenant security must be enforced at every layer, not just at the API gateway.

1. Clarify Requirements and Constraints

Ask about query patterns, data volume, shard count, replication factor, latency SLAs, and tenant isolation requirements to scope the problem.

2. Design the Fan-Out Strategy

Determine how to route queries to relevant shards, handle partial failures, and aggregate results efficiently, possibly using a scatter-gather pattern with timeouts and retries.

3. Implement Deduplication of Replicated Samples

Choose a deduplication method (e.g., unique IDs, hashing, or versioning) and decide where to apply it (per-shard, at the aggregator, or both) to avoid duplicate results.

4. Enforce Cross-Tenant Security

Ensure tenant context is propagated through the query path, enforce access control at each layer (API, query planner, storage), and consider encryption or row-level security.

5. Discuss Trade-Offs and Validation

Compare consistency vs. latency, cost vs. performance, and explain how you would test the design (e.g., chaos engineering, load testing, security audits).

Key Points to Mention

  • Scatter-gather pattern with parallel shard queries and result aggregation
  • Deduplication techniques: unique sample IDs, content hashing, or version vectors
  • Tenant isolation via query rewriting, row-level security, or separate indices
  • Handling partial failures and timeouts during fan-out
  • Caching and pre-aggregation to reduce fan-out overhead
  • Monitoring and observability for query performance and security violations

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

What are the main operational challenges you'd anticipate with this system, particularly around cardinality explosion and the cost of storing high-resolution data long-term?

System DesignTechnical Trade-offsProduct Analytics & Metrics
Author's notes

Cardinality explosion I'd actually thought about before so this part went better.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that cardinality explosion and long-term storage costs are inherent to high-resolution telemetry systems, then systematically break down the challenges and propose mitigation strategies. Frame your answer around trade-offs between granularity, cost, and query performance, and tie it back to Okta's scale and reliability needs.

Pro tip: Show you understand that cardinality explosion isn't just a storage problem—it degrades query performance and increases memory usage in time-series databases. Mention specific techniques like metric relabeling, aggregation, and downsampling, and note that Okta likely uses a combination of open-source and custom solutions.

1. Identify sources of cardinality explosion

Explain how high-dimensional labels (e.g., user IDs, request IDs, IP addresses) and high-frequency events can cause a combinatorial explosion in time-series data. Mention that in Okta's context, per-tenant or per-user metrics can quickly multiply.

2. Assess impact on storage and query performance

Describe how cardinality explosion leads to increased memory and disk usage, slower queries, and higher costs. Note that long-term storage of high-resolution data exacerbates this, especially if retention policies are not tiered.

3. Propose mitigation strategies for cardinality

Suggest techniques like limiting label dimensions, using aggregation at ingest (e.g., rollups), and employing cardinality limits or dynamic sampling. Mention tools like Prometheus relabeling, VictoriaMetrics, or Thanos for handling high cardinality.

4. Address long-term storage cost and retention

Discuss tiered storage (hot/warm/cold), downsampling older data, and using cheaper object storage (e.g., S3) with compression. Highlight the trade-off between resolution and cost, and propose retention policies based on data value.

5. Tie back to Okta's scale and reliability

Emphasize that Okta handles millions of users and requires high availability, so any solution must be scalable, cost-effective, and not compromise on observability. Mention the need for monitoring cardinality itself and alerting on anomalies.

Key Points to Mention

  • Cardinality explosion from high-dimensional labels (e.g., user ID, tenant ID, request ID) and its impact on time-series databases.
  • Techniques like metric relabeling, aggregation, and downsampling to reduce cardinality and storage costs.
  • Tiered storage strategies (hot/warm/cold) and using object storage for long-term retention.
  • Trade-offs between data resolution, query performance, and cost.
  • Okta's scale: multi-tenant, high-volume, and need for real-time monitoring.
  • Monitoring cardinality and setting limits to prevent system degradation.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.