Skip to content

Learn. Practice. Feel prepared.

System Design Interview Questions for Senior Java Developers

Prepare for senior Java developer system design interviews with 50 questions covering architecture decisions, Spring Boot microservices, distributed transactions, database scaling, caching, fault tolerance, and real-world production challenges. Each answer explains the reasoning, tradeoffs, and practical considerations behind designing reliable backend systems.

Top System Design Interview Questions for Freshers and Experienced

50 Questions Easy · Medium · Hard

Try answering from memory, then check the reference answer and rate yourself. Your notes are optional and are not automatically graded.

Filter:

1 Why is stateless application design important when horizontally scaling Spring Boot services? easy

stateless-architecturehorizontal-scalingspring-boot
Reference answer
Stateless services avoid storing user-specific session data in individual application instances. Any instance can process a request because required state is carried in the request or retrieved from shared storage. This simplifies load balancing, autoscaling, and instance replacement. For example, store shared session state in Redis instead of relying on a particular JVM.
Stateless application instances do not mean the entire system contains no state.
Did you know it?

2 How would you decide whether to build a new Java backend as a modular monolith or multiple microservices? easy

microservicesmodular-monolitharchitecture-decisions
Reference answer
Start with a modular monolith when business boundaries are evolving and independent deployments are not yet necessary. Microservices introduce network communication, distributed data consistency, monitoring, and deployment complexity. Choose service separation when ownership, scaling, or release independence provides measurable benefits. A well-structured Spring Boot monolith can later be divided along stable domain boundaries.
Explain why team structure and operational maturity matter alongside application size.
Did you know it?

3 What is the difference between a load balancer and an API gateway in a microservices architecture? easy

load-balancingapi-gatewaymicroservices
Reference answer
A load balancer distributes traffic among healthy application instances. An API gateway provides an entry point for API-specific policies such as routing, authentication integration, and rate limiting. Both may perform routing, but they solve different architectural concerns. For example, Nginx can distribute requests while a gateway applies API-specific authorization and request policies.
Did you know it?

4 Why is a database index not always beneficial for query performance? easy

database-indexingquery-optimizationmysql
Reference answer
An index can reduce the number of rows examined when its structure matches the query predicates and ordering. Indexes consume storage and increase write overhead because inserts, updates, and deletes may modify index entries. Low-selectivity indexes may provide little benefit when the optimizer expects to read many rows. Use EXPLAIN and production-like data distributions to validate whether an index improves the actual query.
Did you know it?

5 What problem does caching solve, and why should a cache not automatically be treated as the source of truth? easy

rediscachingdata-consistency
Reference answer
Caching reduces repeated computation or access to slower storage by keeping frequently needed data closer to consumers. Cached entries may become stale, expire, or disappear during eviction or failure. For ordinary cache-aside designs, the database remains authoritative and cache misses trigger data retrieval. For example, Redis can cache product details while MySQL stores the authoritative product records.
Did you know it?

6 When should a Spring Boot application process work asynchronously instead of completing everything inside an HTTP request? easy

asynchronous-processingmessage-queuesspring-boot
Reference answer
Use asynchronous processing when work is slow, resource-intensive, or does not need to finish before responding. A queue can separate request acceptance from background execution and absorb temporary traffic spikes. For example, accept a report-generation request and return a job identifier while a worker generates the report. Persist job status and define retry behavior because asynchronous execution does not guarantee completion.
Did you know it?

7 What is the difference between replication and sharding in database architecture? easy

database-replicationshardingdatabase-scaling
Reference answer
Replication maintains copies of database data across multiple nodes, commonly for availability and read scaling. Sharding distributes different subsets of data across separate database partitions or servers. Replication alone does not divide the write workload of a single primary database. Sharding can increase write capacity but complicates joins, transactions, and shard-key selection.
Did you know it?

8 What is the purpose of a circuit breaker when one Spring Boot microservice calls another? easy

circuit-breakerresilience4jfault-tolerance
Reference answer
A circuit breaker prevents repeated calls to a dependency that is experiencing sustained failures. It tracks failures and temporarily rejects calls when a configured threshold is reached. This reduces resource exhaustion and can help prevent cascading failures. For example, a checkout service may return a controlled failure when an optional recommendation service becomes unavailable.
Did you know it?

9 Why should a senior Java developer consider both latency and throughput when designing an API? easy

latencythroughputperformance-engineering
Reference answer
Latency measures how long an individual request takes, while throughput measures how much work the system completes per unit of time. Increasing concurrency can improve throughput until CPU, memory, database connections, or another resource becomes saturated. Beyond saturation, queueing delays can sharply increase response times. Evaluate throughput alongside p95 and p99 latency under representative production workloads.
Did you know it?

10 Why are correlation IDs and distributed tracing useful in a microservices system? easy

distributed-tracingobservabilityspring-boot
Reference answer
They help connect operations belonging to the same request across multiple services. Distributed tracing records spans representing operations and their timing, while correlation IDs help associate related logs. This makes it easier to identify slow dependencies, failed downstream calls, and unexpected execution paths. In Spring Boot, Micrometer Tracing can integrate application observations with supported tracing systems.
Did you know it?

11 An e-commerce application receives 20,000 requests per second during a flash sale. How would you scale its Spring Boot backend? medium

high-traffichorizontal-scalingflash-sale
Reference answer
First identify traffic distribution, read/write ratios, database limits, and latency requirements through load testing. Scale stateless application instances behind a load balancer and cache frequently requested product information. Protect inventory writes using controlled concurrency, appropriate database constraints, and admission control. Use queues for noncritical background work, while monitoring database saturation, error rates, and p99 latency.
Adding application instances cannot solve a saturated shared database by itself.
Did you know it?

12 You are splitting a Spring Boot monolith into microservices. How would you determine service boundaries? medium

domain-driven-designservice-boundariesmicroservices
Reference answer
Identify business capabilities, domain ownership, transaction boundaries, and data that changes together. Prefer cohesive services that own their business rules and persistence rather than splitting by controllers or database tables. Introduce clear APIs and events between domains, then migrate functionality incrementally. For example, order management and catalog management may become separate services when their responsibilities and release cycles are sufficiently independent.
Did you know it?

13 How would you design a rate limiter for a public REST API running across multiple Spring Boot instances? medium

rate-limitingredisapi-security
Reference answer
Define limits by authenticated principal, API key, or trusted client identity and select a token-bucket or sliding-window policy. Use shared state, such as Redis with an atomic operation, when limits must apply consistently across instances. Return HTTP 429 when requests exceed the policy and provide appropriate retry guidance. Consider Redis failures, hot keys, clock behavior, and whether the system should fail open or fail closed.
Did you know it?

14 A Spring Boot service reads product details from Redis and MySQL, but customers sometimes see old prices. How would you fix the consistency problem? medium

cache-invalidationredisdata-consistency
Reference answer
Identify whether stale prices result from missing invalidation, long TTLs, delayed updates, or concurrent cache writes. Use cache-aside with invalidation after a successful database update, and consider versioned values to prevent older data from overwriting newer data. For correctness-critical checkout pricing, validate the authoritative price before committing the order. Test concurrent reads and writes because database updates and cache invalidation are not automatically atomic.
Did you know it?

15 How would you design a notification service that sends email and mobile push notifications without slowing down business APIs? medium

notification-systemmessage-queuesretry-strategy
Reference answer
Publish notification requests to a durable messaging system and process them using independent workers. Store delivery status, apply bounded retries with backoff, and move repeatedly failing messages to a dead-letter workflow. Use idempotency identifiers to reduce duplicate notifications during redelivery. Separate email and push processing so one provider's outage does not block the other channel.
Did you know it?

16 An order service writes an order to MySQL and then publishes an event to Kafka. What happens if the database commit succeeds but publishing fails? medium

transactional-outboxkafkadistributed-consistency
Reference answer
The order exists, but downstream consumers may never receive the event, leaving services inconsistent. Use the transactional outbox pattern to store the business change and an event record in the same database transaction. A separate publisher reliably transfers pending outbox records to Kafka and records publication progress. Consumers still need idempotency because publication retries can produce duplicate deliveries.
Did you know it?

17 How would you implement pagination for an API that returns millions of transaction records? medium

keyset-paginationdatabase-indexingrest-api
Reference answer
Prefer keyset pagination when users primarily navigate forward through large, ordered datasets. Use a stable ordering such as created_at DESC followed by id DESC, with matching cursor predicates and indexes. Offset pagination can become expensive for deep pages because the database must process skipped records. Encode cursor information safely and account for newly inserted records when defining pagination consistency.
Did you know it?

18 A payment API receives the same request twice because the client retries after a timeout. How would you prevent duplicate charges? medium

idempotencypayment-processingapi-design
Reference answer
Require a client-generated idempotency key scoped to the operation and authenticated customer. Persist the key, request fingerprint, processing state, and final outcome using atomic database constraints. Repeated requests with the same key and payload should return the established result rather than execute another charge. Coordinate with the payment provider's idempotency support because local deduplication alone cannot resolve every uncertain external outcome.
Did you know it?

19 A reporting API performs expensive joins and frequently times out. How would you redesign it? medium

reporting-systemquery-optimizationread-models
Reference answer
Inspect query plans, indexes, data volume, and actual reporting freshness requirements before changing architecture. For expensive recurring aggregations, consider precomputed summaries, materialized reporting tables, or asynchronous report generation. Move analytical workloads to a read replica or dedicated analytical store when appropriate. Define acceptable staleness and refresh behavior rather than assuming every report requires live transactional queries.
Did you know it?

20 How would you secure communication between Spring Boot microservices when users authenticate through a central identity provider? medium

oauth2service-to-servicezero-trust
Reference answer
Separate end-user identity from service identity and define which permissions each downstream operation requires. Validate token issuer, audience, signature, expiration, and applicable scopes at the appropriate trust boundary. Use service credentials or token exchange where service identity and delegated user authorization must be distinguished. Protect transport with TLS and avoid assuming that internal network access automatically establishes authorization.
Did you know it?

21 A Kafka consumer occasionally processes the same order-created event twice. How would you diagnose and handle it? medium

kafka-consumeridempotent-consumerevent-processing
Reference answer
Check consumer retries, offset commits, rebalances, processing exceptions, and producer-side duplicate publication. Treat duplicate delivery as a normal possibility and make the business operation idempotent. Record processed event identifiers with the corresponding database changes in one transaction when feasible. Kafka's exactly-once processing capabilities do not automatically make arbitrary external database or HTTP side effects exactly once.
Did you know it?

22 How would you design a URL-shortening service that supports millions of links and high read traffic? medium

url-shorteneridentifier-generationread-scaling
Reference answer
Generate unique short identifiers, store mappings with unique constraints, and redirect users through a read-optimized lookup path. Cache frequently accessed mappings and distribute read traffic across stateless application instances. Use durable storage for mappings and define policies for expiration, abuse prevention, and unavailable destinations. Choose identifier generation and partitioning strategies based on collision handling, predictability, and expected growth.
Did you know it?

23 A Spring Boot service has sufficient CPU and memory, but response times increase sharply under concurrent traffic. What would you investigate? medium

thread-poolshikaricpperformance-debugging
Reference answer
Inspect request-thread utilization, JDBC connection-pool waits, downstream latency, lock contention, and executor queues. Use thread dumps, tracing, pool metrics, and load tests to locate where requests are waiting. A database pool with 20 connections can bottleneck hundreds of concurrent requests even when CPU remains mostly idle. Fix the limiting resource or reduce blocking work before increasing thread counts.
Did you know it?

24 How would you perform a database schema change without downtime when multiple application versions run simultaneously? medium

schema-migrationzero-downtimebackward-compatibility
Reference answer
Use an expand-and-contract migration where old and new application versions can coexist temporarily. First add backward-compatible schema changes, then deploy code that supports the transition and migrate existing data. Switch reads and writes carefully before removing obsolete columns or constraints. For example, introduce a nullable replacement column before requiring applications to populate it.
Did you know it?

25 How would you design an audit logging system for sensitive changes made through multiple microservices? medium

audit-loggingdata-integritysecurity-design
Reference answer
Capture the actor, action, target resource, timestamp, request context, and relevant before-and-after changes. Store audit records in access-controlled durable storage with retention and tamper-detection controls appropriate to the threat model. Use transactional recording or an outbox when audit completeness must be coupled to business changes. Avoid storing secrets or unnecessary personal data, and distinguish security audit records from ordinary application logs.
Did you know it?

26 How would you design a search API for a large product catalog where users filter by price, category, and keywords? medium

elasticsearchsearch-architectureeventual-consistency
Reference answer
Use a search-oriented index when keyword relevance and flexible filtering exceed the capabilities of ordinary database queries. Keep the transactional database authoritative and propagate product changes to the search index asynchronously. Combine text relevance with structured filters and deterministic sorting or pagination. Define indexing lag, deletion handling, and reconciliation because the search index may temporarily differ from the database.
Did you know it?

27 How would you choose between synchronous REST calls and asynchronous events for communication between two services? medium

rest-apievent-driven-architectureservice-communication
Reference answer
Use synchronous calls when the caller requires an immediate response to complete its operation. Use events when consumers can react independently and temporary processing delays are acceptable. Synchronous calls introduce runtime coupling, while events introduce delivery, ordering, and consistency concerns. For example, validate inventory synchronously when required for checkout, but publish an order event for analytics.
Did you know it?

28 A distributed application uses Redis locks to ensure only one worker processes a scheduled job. What could go wrong? medium

distributed-lockingredisscheduled-jobs
Reference answer
A worker may pause or lose connectivity long enough for its lock lease to expire while it is still executing. Another worker can then acquire the lock, causing overlapping execution despite the locking mechanism. Use unique lock ownership tokens, bounded leases, and fencing tokens where downstream resources support them. Make the job idempotent because a distributed lease alone does not guarantee exactly-once execution.
Did you know it?

29 How would you deploy a new Spring Boot version gradually while minimizing production risk? medium

canary-deploymentrolling-deploymentrelease-engineering
Reference answer
Use rolling, canary, or blue-green deployment according to infrastructure capabilities and rollback requirements. Verify readiness before routing traffic and observe errors, latency, resource consumption, and business metrics. Keep database changes backward compatible while multiple application versions coexist. Automate rollback criteria where practical, but remember that irreversible data changes may require forward recovery.
Did you know it?

30 A Java application experiences frequent garbage collection pauses after a traffic increase. How would you investigate? medium

jvm-garbage-collectionmemory-profilingproduction-debugging
Reference answer
Collect GC logs, heap occupancy, allocation rates, pause durations, and JVM memory metrics. Use heap dumps or allocation profiling to identify excessive object creation, retained objects, or memory leaks. Compare the workload against configured heap size, collector behavior, and container memory limits. Reduce unnecessary allocations or retention before relying exclusively on larger heaps or GC tuning.
Did you know it?

31 Design a distributed order-processing system where inventory reservation, payment, and shipping belong to separate Spring Boot services. How would you handle partial failures? hard

saga-patterndistributed-transactionsorder-processing
Reference answer
Use a saga with explicit state transitions and durable progress tracking rather than assuming one ACID transaction spans all services. Reserve inventory, authorize payment, and initiate shipping through coordinated steps with idempotent handlers. Define compensations such as releasing inventory or voiding payment authorization when later steps fail. Some actions cannot be perfectly reversed, so support reconciliation, manual intervention, and clear terminal states.
Compensation is a new business operation, not a guaranteed database rollback.
Did you know it?

32 A ticket-booking system has 500 seats, but 50,000 users attempt to book simultaneously. How would you prevent overselling while maintaining throughput? hard

concurrency-controlinventory-reservationhigh-contention
Reference answer
Make seat allocation authoritative in transactional storage using conditional updates or unique constraints that prevent conflicting reservations. Introduce short-lived reservations with explicit expiry and payment confirmation states. Use admission control or queues to limit contention, while keeping database concurrency controls as the final correctness boundary. Handle expired reservations, payment uncertainty, retries, and delayed confirmations without assigning the same seat twice.
Did you know it?

33 A MySQL primary handles all writes while replicas serve reads. After updating a profile, users sometimes see the old value. How would you guarantee read-your-writes behavior? hard

read-your-writesreplication-lagconsistency-models
Reference answer
Replication lag allows a replica to return older data even after the primary commits successfully. Route dependent reads to the primary, or use a replication-position mechanism to wait until a replica has applied the required change. Apply stronger consistency only where necessary because primary reads or replica waiting can reduce scalability. For example, read the updated profile from the primary immediately after saving it, while allowing eventual consistency for unrelated browsing.
Did you know it?

34 How would you design a multi-region Java backend that must remain available during a regional outage without silently losing committed financial transactions? hard

multi-regiondisaster-recoverystrong-consistency
Reference answer
Define durability, recovery point, recovery time, and consistency requirements before selecting active-passive or active-active deployment. Use a storage replication and commit strategy whose acknowledged-write guarantees match the required data-loss tolerance. Control write leadership and fencing during failover to prevent conflicting writers and split-brain behavior. Strong cross-region durability may increase write latency or reduce write availability during network partitions, so expose those tradeoffs explicitly.
Did you know it?

35 A Redis cache expires thousands of popular keys simultaneously, causing MySQL CPU to spike. How would you redesign the caching strategy? hard

cache-stampederedisdatabase-protection
Reference answer
The system is experiencing synchronized cache misses that create a sudden surge of database reads. Add expiration jitter, request coalescing or single-flight loading, and bounded refresh concurrency. For very hot data, consider proactive refresh or carefully designed stale-while-revalidate behavior. Protect the database with concurrency limits and measure whether stale responses are acceptable for each data category.
Did you know it?

36 A service makes parallel calls to five downstream APIs. Each API usually responds within 100 ms, but occasional delays cause severe p99 latency. How would you establish timeout and retry policies? hard

tail-latencytimeout-budgetretry-storm
Reference answer
Define an end-to-end request deadline and allocate bounded time budgets to downstream operations. Use connection and response timeouts, concurrency limits, and cancellation where supported. Retry only suitable failures with bounded attempts, jittered backoff, and enough remaining deadline, avoiding retries at every service layer. Measure tail latency and dependency saturation because parallel calls can amplify the probability of encountering a slow dependency.
Did you know it?

37 How would you design an event-driven system that preserves ordering for events belonging to the same customer while scaling consumers horizontally? hard

kafka-partitioningevent-orderingconsumer-scaling
Reference answer
Partition events by a stable customer identifier so events for one customer are routed to the same ordered partition. Process records sequentially for that partition when business correctness requires strict order. Different customers can be processed in parallel, but a very active customer may create a hot partition. Handle producer ordering, retries, replay, and state versioning because partition ordering alone does not guarantee correct business state transitions.
Did you know it?

38 A system has 30 Spring Boot services and uses a central authentication service that issues RS256 JWTs. How would you design authorization without making the authentication service a bottleneck? hard

jwt-rs256distributed-authorizationkey-rotation
Reference answer
Publish trusted public verification keys through a controlled key-distribution mechanism and validate signed access tokens locally at resource services. Validate issuer, audience, expiry, algorithm, and applicable permissions rather than trusting signature verification alone. Keep coarse-grained identity claims in tokens while evaluating resource-specific authorization against current domain rules. Plan key rotation, token revocation requirements, and policy changes because locally verified JWTs may remain valid until expiration.
Did you know it?

39 A payment service calls an external provider, but the HTTP request times out after the provider may have completed the charge. How would you recover safely? hard

payment-reconciliationidempotencyfailure-recovery
Reference answer
Treat the payment outcome as unknown rather than immediately marking it failed or issuing another charge. Persist the operation identifier and query the provider using its transaction reference or idempotency key. Use provider webhooks and reconciliation jobs to converge the local payment state with the external result. Model states such as PENDING, SUCCEEDED, FAILED, and REQUIRES_REVIEW, and avoid repeating non-idempotent financial operations.
Did you know it?

40 How would you design a real-time collaborative editing backend where multiple users update the same document concurrently? hard

collaborative-editingcrdtwebsocket
Reference answer
Define the collaboration consistency model and choose operational transformation or a suitable CRDT approach for concurrent edits. Assign document versions or operation identifiers and persist an ordered or mergeable change history. Use WebSockets for low-latency updates while supporting reconnect, replay, and snapshot recovery. Consider offline edits, authorization changes, conflict semantics, and storage compaction rather than relying on message delivery order alone.
Did you know it?

41 A Spring Boot application uses a fixed thread pool of 200 threads and a JDBC pool of 20 connections. Under heavy traffic, requests accumulate and memory usage rises. How would you redesign concurrency control? hard

concurrency-limitsjdbc-poolbackpressure
Reference answer
Measure active database connections, connection wait time, executor queue depth, and request arrival rate to identify the actual bottleneck. Apply bounded queues, admission control, and concurrency limits aligned with database capacity. Optimize transaction duration and reduce blocking database work before increasing connection counts. Virtual threads can reduce the cost of blocked Java threads but do not increase database capacity or eliminate downstream contention.
Did you know it?

42 How would you migrate a large customer table from one MySQL database to a sharded architecture while keeping the application available? hard

database-shardingonline-migrationchange-data-capture
Reference answer
Select a shard key using access patterns, tenant distribution, data locality, and expected growth. Backfill data incrementally while capturing ongoing changes through CDC or a controlled dual-write migration process. Validate record counts, checksums, routing correctness, and consistency before moving read and write ownership. Plan rollback, cross-shard queries, unique identifiers, and hot-shard mitigation because data movement is only one part of sharding.
Did you know it?

43 A production incident shows that a recommendation-service outage caused checkout failures even though recommendations are optional. How would you prevent this failure from recurring? hard

bulkhead-patterngraceful-degradationfault-isolation
Reference answer
Trace the dependency path to determine whether checkout waits on recommendation calls, exhausts shared resources, or propagates their exceptions. Introduce strict timeouts, circuit breakers, and resource isolation around the optional dependency. Return checkout results without recommendations when that dependency is unavailable, preserving critical business behavior. Test the fallback under slow responses, connection exhaustion, and partial network failures rather than only immediate exceptions.
Did you know it?

44 How would you design a large-scale file upload service supporting multi-gigabyte uploads, resumability, malware scanning, and secure downloads? hard

object-storageresumable-uploadfile-security
Reference answer
Use authenticated upload sessions and direct multipart or chunked uploads to object storage to avoid routing large files through application memory. Track upload ownership, part completion, integrity checks, and finalization using durable metadata. Keep uploaded objects quarantined until scanning and validation succeed, then authorize access to approved files. Use short-lived signed download URLs or an authenticated download proxy, and enforce file-size, retention, and tenant-isolation policies.
Did you know it?

45 A multi-tenant SaaS platform stores customer data in shared MySQL tables. How would you enforce tenant isolation when requests pass through several microservices? hard

multi-tenancytenant-isolationauthorization
Reference answer
Establish tenant identity from trusted authentication context and propagate it through authenticated service communication. Enforce tenant-scoped authorization and queries at service and data-access boundaries, not only in controller filters. Use composite keys or tenant-aware constraints where needed to prevent cross-tenant relationships and updates. Test direct object references, asynchronous jobs, cache keys, and administrative operations for tenant-data leakage.
Did you know it?

46 A Kafka-based analytics pipeline falls several hours behind during peak traffic. How would you determine whether adding consumers will improve throughput? hard

kafka-consumer-lagpartition-skewthroughput-optimization
Reference answer
Measure consumer lag by partition, processing latency, partition count, broker health, and downstream storage capacity. Additional consumers in the same group can improve parallelism only up to the available partition count and other bottlenecks. Optimize batching, processing cost, and downstream writes before scaling consumers blindly. If lag is concentrated in one hot partition, reconsider partition-key distribution or workload isolation while preserving required ordering.
Did you know it?

47 How would you design a globally distributed rate limiter when the business requires a near-global quota but cannot tolerate high latency on every request? hard

distributed-rate-limitingglobal-quotasconsistency-tradeoffs
Reference answer
A strictly enforced global quota requires coordination that can add cross-region latency or reduce availability during partitions. For near-global limits, allocate regional token budgets and periodically reconcile usage against a central quota. Bound possible overshoot through conservative allocations, short reconciliation intervals, and reserved capacity. Use stronger centralized enforcement for operations where exceeding the quota is unacceptable, and document the availability tradeoff.
Did you know it?

48 A production deployment introduces an API field rename while older mobile clients and asynchronous consumers still use the previous field. How would you evolve the contract safely? hard

api-versioningcontract-testingschema-evolution
Reference answer
Treat the rename as a breaking change and introduce the new field without immediately removing the old one. Support a documented transition period with compatibility adapters or explicit API versioning where necessary. Use consumer-driven contract tests and schema compatibility checks for affected HTTP and event consumers. Measure old-field usage and remove compatibility only after clients and replay requirements have been addressed.
Did you know it?

49 A Spring Boot microservice shows normal average latency, but p99 latency jumps from 200 ms to 8 seconds after deployment. How would you investigate systematically? hard

p99-latencydistributed-tracingincident-debugging
Reference answer
Compare before-and-after traces, latency histograms, deployment changes, and dependency metrics rather than relying on averages. Inspect slow database queries, connection waits, thread contention, GC pauses, retries, and external calls for correlation with tail requests. Reproduce the problem under representative concurrency and isolate the regression using controlled comparisons. Rollback when customer impact is severe, then verify the root cause with evidence before redeploying a fix.
Did you know it?

50 Design a system that processes one million financial transactions per day with auditability, disaster recovery, and protection against duplicate processing. What architecture and validation strategy would you choose? hard

financial-systemsdisaster-recoverytransaction-integrity
Reference answer
Use durable transactional storage with explicit transaction states, immutable audit records, unique operation identifiers, and database-enforced financial invariants. Integrate asynchronous consumers through an outbox and idempotent processing, with reconciliation for uncertain external outcomes. Define recovery objectives and choose replication, backup, and failover mechanisms that satisfy acknowledged-write durability requirements. Validate the design through concurrency tests, duplicate-delivery tests, fault injection, restore drills, and end-to-end ledger reconciliation.
Discuss correctness and recovery objectives before estimating infrastructure capacity.
Did you know it?
0 / 0 answered

↑ Back to top