Skip to content
Tech Interview Prep
Technical interview guide

Platform APIs & Abstraction Layers

Designing the interface between a platform and the teams using it: what to expose, and what to hide.

Read
42 min
Practice MCQs
25
Interview Q&A
25
Edition
v3
Editorial status
Reviewed
Relevant for
Platform Engineer

Scope: AWS and Microsoft platform engineering guidance, Google Cloud API Design Guide/AIPs, and Kubernetes API documentation current 2026-08-31.

Curated: · Written: · Reviewed:

25 questions

MCQ-3A platform team wraps their object-storage SDK in a `StorageService` interface. Callers still pass `bucket` and `key`, read back an `etag`, and call `startMultipartUpload()`. When the team trials a second provider, every call site needs edits. Which description best fits this design?
MCQ-5A platform team ships a web portal and a CLI against the same backend. A security review finds that the CLI can delete a project the portal blocks for the same user, because the delete check lives in the portal's controller. What should the two clients share so this class of bug stops recurring?
MCQ-9A client cancels an in-flight RPC while the server handler is midway through a multi-step operation. The handler polls the cancellation token between steps. Which guarantee does the cancellation itself provide?
MCQ-6A team models a nightly export as a declarative resource, so the controller will retry until the export succeeds. The controller reconciles `Export` objects: every 30 seconds it lists them all and, for each object whose `status.completedAt` is unset, starts a copy job that streams 200 GB from a tenant bucket to cold storage. A copy takes about 50 minutes. When a job it started reports success, the controller sets `status.completedAt`. The controller does nothing else with `Export` objects. A tenant creates one `Export` at 02:00:00 and nothing else changes. What happens over the next hour?
MCQ-22Suppose a ConfigMap starts empty at resourceVersion 700. Two services, A and B, both use optimistic concurrency: GET, modify, PUT with the resourceVersion from the GET, and on 409 re-GET and retry. A adds key x=1 and its PUT with resourceVersion 700 returns 200; the object's resourceVersion is now 701. B, which wants to add key y=2, had cached the empty object at startup. B's PUT with resourceVersion 700 returns 409, so B re-GETs (now seeing x=1), but B's reapply function rebuilds the data map from its startup cache and adds y=2, then PUTs with the freshly fetched resourceVersion. What does the server return, and what does the ConfigMap contain afterward?
MCQ-8A provisioning service receives 2 requests per second. Each request that reaches a worker reserves one slot from a pool of 100 and holds it for 30 seconds; a slot is held for the full 30 seconds even when the request turns out to be invalid, because the operation is not cancelled early. Today the worker reserves the slot first and validates the request shape afterwards, and 40% of requests fail that validation. The team moves the shape validation ahead of slot reservation, so invalid requests never reserve a slot. Validation costs about 1 ms of CPU per request and is not a bottleneck. What is the steady-state average number of reserved slots after the change?
MCQ-23A platform API exposes 25 routes and is called by 40 internal services from 6 regions, with three API versions live at once. The team wants error and latency metrics broken down finely enough that an on-call engineer can answer "which calling service is failing on which route" during an incident. Their metrics backend bills per active time series and the budget is 20,000 series; each histogram metric emits 12 bucket series plus _sum and _count. Which label set stays within budget and still answers the incident question?
MCQ-13A document service exposes GET /documents/{id}. The handler loads the row, returns 404 when it is absent, then returns 403 when the row's tenant differs from the caller's. A pen-test token scoped to tenant A sent 5,000 sequential IDs: 3,158 came back 404 and 1,842 came back 403, and the 403s took 12 ms against 3 ms for the 404s, letting the tester map which IDs exist in other tenants. The fix must leave no observable difference between a document that does not exist and one the caller may not read. Which change achieves that?
MCQ-21An incident API serves 40 tenants from one `incidents` table. `GET /incidents/{id}` returns 404 for rows outside the caller's tenant, and that check is covered by tests. The list endpoint runs `SELECT * FROM incidents WHERE status = $1 ORDER BY created_at DESC LIMIT 50 OFFSET $2`, then drops rows whose `tenant_id` differs from the caller before serializing; `total` comes from a separate `COUNT(*)` with the same `status` predicate. Search runs the same shape (`title ILIKE '%q%'`, ordered by `created_at`, `LIMIT 50`) then applies the same post-fetch tenant filter. Tenant A holds 300 of the table's 12,480 incidents. Its users report that page 3 of the open list is empty, `total` reads 12,480, and a search for `payment` returns nothing although tenant A has 4 matching incidents. Which change fixes all three?
MCQ-1A platform team's object-storage API fronts one provider today and wires in a second next month. All 40 consumer teams are pinned to v1 and none of them can ship code before the migration. Every v1 response carries three provider-owned fields (providerEtag, providerStorageClass and providerRegion) and the second provider's storage classes do not map one-to-one onto the first's. An audit of the 40 teams found: - 9 map each providerStorageClass value through a table into one of their own storage classes, and raise on a value the table does not hold. - 14 write providerStorageClass into a log line; their storage decisions come from the platform's tierHint field. - 8 never read any of the three fields, using only the platform's objectId and sizeBytes. - 6 use providerEtag as an opaque token to detect duplicate uploads. - 3 copy providerRegion into a metrics label. How many of the 40 teams' code paths fail when the second provider goes live?
MCQ-4A platform team's managed-Postgres API takes one caller-facing knob, `size: small|medium|large`; the platform chooses replication factor, backup retention and failover region, and its docs state that it owns backup and deletion and list the guarantees each size provides. Six months in, two product teams run their own `pg_dump` cron jobs to object storage and one keeps a hand-built standby in a second region. Which property of the API produced this behavior?
MCQ-25A managed database platform exposes `shared_buffers_bytes` in its tenant config API. Engine A (B-tree) sizes its page cache from that field. The team is migrating 400 tenants to engine B (LSM), whose memory is a single budget split between memtables and the block cache; 380 of the 400 tenants set the field explicitly. After migrating the first 50 tenants, 12 file tickets: they set the field to 8 GB, the migration reported success, and p99 read latency went from 3 ms to 40 ms with no error or warning. Which action should the team take before migrating the remaining 350?
MCQ-20A multi-tenant config service validates every write against a JSON Schema (p99 12 ms) and serves reads from a cache (p99 2 ms). The read SLO is 10 ms p99; the write SLO is 200 ms p99. A product team needs a per-tenant extension field the schema does not model. The platform team will add one escape hatch. It must keep the read SLO and must never serve unvalidated data. Which design meets both?
MCQ-14A payments API serves GET /v2/charges/{id} as JSON. Two consumers read it. - Mobile app: decodes into generated models that ignore keys they do not declare, and maps status with a switch whose default branch renders an "unknown status" badge. - Settlements service: decodes with Jackson configured FAIL_ON_UNKNOWN_PROPERTIES = false, and maps status with a switch over the status string that throws IllegalStateException for any value it has no case for. Release 2.31.0 made two additive changes: it added an optional statement_descriptor string to the charge response, and it began returning status "DISPUTED" for charges under dispute. Nothing was removed, no field became required, and the settlements service redeployed with regenerated models the same day. In the next 24 hours the settlements service logged IllegalStateException on 11.3% of the charge syncs it processed, while 11.4% of the charges the API returned carried status DISPUTED. Every response carried statement_descriptor. The mobile app's crash rate held at 0.02%. Which explanation accounts for the settlements failures and for the mobile app staying at 0.02%?
MCQ-16Your API's compatibility gate passes any change that keeps every existing field's name and type intact. Which change slips through that gate and still breaks existing callers?
MCQ-15An orders API returns `status` as a JSON string enum with exactly four values: PENDING, PAID, SHIPPED and CANCELLED. The iOS app v4.2 (shipped eight months ago, 91% of installs, next release train in six weeks) calls `GET /orders?page=1`, which returns 20 orders, and decodes the array into one generated model: it ignores JSON keys it does not know, but throws on any `status` string outside those four cases, and a throw fails the whole response, so the order-history screen shows a single retry error in place of the list. The server team deploys a change that emits a fifth value, RETURNED, for the 6% of orders that are returns. Which outcome should the team expect?
MCQ-17The payments API endpoint /v1/orders returns a legacy settlement_state field; its replacement /v2/orders replaced it and reached General Availability on 2025-01-20. The platform deprecation policy has three rules: a removal notice may be served only once the replacement has been GA for 90 days, and a notice takes effect on the day it is served under this policy; removal may follow no sooner than 12 months after notice is served; and the deprecated endpoint must have carried no traffic in the 90 days before removal. The team emailed the notice on 2025-03-01. The last recorded invocation of /v1/orders was 2024-12-05. Today is 2025-04-10. What is the earliest date the team may remove /v1/orders?
MCQ-19A platform team ships one storage abstraction over three object stores. Store A supports conditional PUT (If-None-Match); B and C do not. `createIfAbsent(key)` is implemented as GET-then-PUT for all three. In a benchmark with 200 concurrent writers on one key, A produced 0 duplicate objects, B produced 37, and C produced 41. Two lock services use `createIfAbsent` to acquire a lock, and on B both acquired the same lock and processed the same payment twice. Which change prevents the double-processing?
MCQ-12A payments gateway fronts three card processors. Its client SDK retries any 5xx three times with exponential backoff. The gateway maps every upstream failure to `502` with `{"error": "<processor prose>"}`. Last week that produced 41,000 duplicate charge attempts from retries of declines that can never succeed, and on-call spent about 25 minutes per incident working out which processor had failed. Which change to the error body fixes both problems?
MCQ-7A provisioning API creates a cluster in 6–9 minutes. The gateway closes idle connections at 60 s, and the client SDK shipped to customers aborts any request at 30 s. The handler currently holds the POST open until the provider returns; clients time out, retry, and the team finds two clusters per request. Which change removes the duplicate clusters?
MCQ-10A payments API handles POST /charges with a client-generated Idempotency-Key header. The handler runs one transaction: (1) SELECT the key from an idempotency table, and if a row exists return its stored response; (2) call the payment provider to create the charge; (3) INSERT the key and the provider's response; then commit. During a retry storm the client sends the same key twice, 300 ms apart, and both requests execute concurrently. What does the API do?
MCQ-11A queue consumer uses at-least-once delivery. Its handler runs four steps, each committing on its own: (1) INSERT the message id into a `processed` table with a unique index on `msg_id`; (2) if that insert raises a duplicate-key error, return and ack; (3) call the card processor and INSERT a row into `charges`; (4) ack the message. The orchestrator kills the consumer after step 1 commits and before step 3 starts. The broker redelivers the message and the handler runs again. What does `charges` hold for this message, and why?
MCQ-2A workflow platform writes a checkpoint to a replicated store before each step runs, so a job resumed after a spot reclaim replays the step that was in flight. A customer's job processes 500 invoices; each step calls a third-party billing API that charges the customer's account and supports idempotency keys with a 24-hour dedup window. The fleet is spot-only and jobs are reclaimed about once every 4 hours. After a reclaim, the invoice that was in flight is charged twice. Which change stops the double charge?
MCQ-18A payments platform exposes `RefundPort.refund(orderId, amountCents, idempotencyKey)` with the contract: return `REFUNDED` only once the provider has committed the refund, and a retry with the same idempotency key must be safe. Providers A and B commit synchronously. Provider X answers `202 {"refund_id": ...}` and settles 2–30 s later; its status endpoint reports `pending`, `succeeded` or `failed`. The X adapter returns `PENDING` on the 202, so the caller's retry loop re-calls after 5 s; X then answers `409 refund_already_exists`, which the adapter maps to a hard failure. Last week 412 orders sat in `REFUND_PENDING` and support re-issued 37 refunds by hand. What should the X adapter do?
MCQ-24A payments API runs 240 pods across three zones behind a regional load balancer, serving 1,800 transactions/sec. At 02:14 the managed control plane's API server starts returning 503s and etcd has lost quorum; the data plane is unaffected. Six deployment rollouts are queued and the autoscaler can no longer read metrics. The standby region has capacity for 60 pods, and traffic triples at 06:00. What should the on-call engineer do?