Interview guides · Cyara
Cyara Software Engineer Interview Guide
Cyara Software Engineer interview guide: written questionnaire, technical rounds, and prep for concurrency, SIP vs WebRTC, retries and test automation.
The 60-second brief
Cyara builds a customer experience (CX) assurance platform. Candidates describe it as SaaS that runs automated tests, load tests and continuous monitoring against contact center technology: IVR systems, telephony routing, WebRTC, digital chat channels and voicebots. The product generates large volumes of simulated customer interactions so an enterprise can see how its contact center behaves under traffic. A Software Engineer there works on that SaaS, for example the load-generation engine and the APIs used to automate tests, plus the profiling and database work that keeps both fast.
This guide is for candidates interviewing for a Software Engineer position at Cyara.
Candidates report 2 rounds over roughly 2-4 weeks: an Initial Screening built around a written technical questionnaire, then Technical Rounds with engineers covering system design, coding and domain-specific problems.
Focus areas
- Functional Testing
- Load Testing
- Monitoring
Overview
Cyara's product simulates customer interactions against contact centers and measures what happens. That explains the shape of the reported questions. Some are classic backend topics: thread synchronization, race conditions, query tuning and connection pooling. Some belong to the product's own domain: simulating 10,000 concurrent voice calls, WebRTC versus SIP-based VoIP, the life of a network packet in a VoIP environment. The rest are about testing itself: load versus stress versus functional testing, automated suites for asynchronous and webhook-driven systems, and a flaky-test debugging story. Prepare all three families, because a call-simulator design answer needs concurrency, networking and a measurement plan at once.
The requirements candidates describe list backend work in C#/.NET, Java or C++, multi-threaded programming, and database optimization in SQL or NoSQL. VoIP, SIP, WebRTC, AWS or Azure, Docker and Kubernetes are listed as nice to have, and the web interface is described as JavaScript/TypeScript. Pick one backend language and be fluent in its concurrency primitives (locks, atomics, concurrent collections, async/await or executors), because the race-condition and 10,000-call questions are easiest to answer with concrete code in a language you know. Reported topic areas also include garbage collection, CPU profiling and memory leaks in long-running services that handle streaming audio.
The written questionnaire is a stage of its own. Candidates describe it as a set of technical scenarios answered in writing, with weight on structure, readable code or pseudocode, and explicit edge cases. Treat each answer as a short design note: restate the problem, state assumptions, give the approach, list failure modes, and say how you would test it. The reported scenarios include a retry mechanism for a failing third-party API, a log-parsing script that finds performance bottlenecks, and backoff against external telephony APIs, so have a tidy template ready for each.
Candidates also report that the process can move quickly, particularly near the end, and that logistics come up early: availability, compensation expectations and decision timeline. Settle those answers before the first call so that preparation time goes to the technical material.
The Cyara interview process
Candidates describe two stages. The first is written; the second is live with engineers. Each stage below says what is reported and how to prepare for it.
Initial Screening
Candidates describe the Initial Screening as a written technical questionnaire, which they report can be sent by the recruiting team. You answer technical scenarios in writing, so the answer is a document someone else reads without you in the room. The reported question types for this kind of stage include an explanation of a retry mechanism for a failing third-party API, a script or pseudocode that parses a system log for performance bottlenecks, and an explanation of how a packet travels through a VoIP environment. For each, write in a fixed order: assumptions, approach, code or pseudocode, edge cases and failure modes, then how you would test it. Put your reasoning and the trade-offs you rejected on the page; a bare code block gives the reader nothing to evaluate.
What to demonstrate
- Clear, well-documented written answers to technical scenarios, as candidates describe the stage
- Whether code or pseudocode is readable on its own
- Whether failure points and edge cases are named explicitly, such as timeouts, retries and malformed log lines
How to prepare
- Write a complete answer to the custom retry mechanism question: which errors are retryable, capped exponential backoff with jitter, a retry budget, an idempotency key, and what you do when retries run out.
- Write the log-parsing script in your strongest language: stream the file line by line, parse timestamps and latencies, group by operation, and report percentiles and the slowest entries, handling malformed lines.
- Draw the path of a VoIP packet from capture and encoding through the network to the jitter buffer and decoder, and mark where delay, jitter and loss enter.
- Add a short test plan to every answer: the cases you would run and what each proves.
Technical Rounds
Candidates describe the Technical Rounds as interviews with the engineering team focused on system design, coding and domain-specific challenges. The reported question families that fit these formats are concurrency (thread synchronization and race conditions), design (simulating 10,000 concurrent voice calls while keeping real-time performance metrics, database query and connection-pool tuning), the architectural differences between WebRTC and SIP-based VoIP, and test-suite design for asynchronous, webhook-heavy applications. Reported example scenarios include a latency-collecting monitoring agent for thousands of endpoints and a memory leak in a long-running audio-processing service. Practise by talking through trade-offs aloud, since design questions have no single correct architecture.
What to demonstrate
- System design reasoning for high-concurrency workloads
- Working code and concurrency correctness in a live coding format
- Domain knowledge of network protocols such as TCP/IP, UDP, SIP and WebRTC, which candidates report as part of the stage
How to prepare
- Rehearse the 10,000-call simulator design aloud: a control plane that schedules calls, workers that hold per-call state, a media path separate from signalling, and metrics aggregated close to the worker so measurement does not slow the load.
- Prepare the database answer with specifics: indexes and query plans, batching writes, pool sizing against the database's connection limit, and read replicas versus caching.
- Be able to explain SIP signalling plus RTP media against WebRTC, which adds ICE, STUN/TURN and encrypted media negotiation through a browser-oriented stack.
- Practise a memory-leak investigation sequence for a long-running service: watch heap growth, take snapshots, diff them and trace the retained references.
Where candidates lose points
Answering the race-condition question with "use a lock" and nothing more
Name the shared state first, then pick the tool by how it is used: a lock for a compound invariant, an atomic or interlocked operation for a single counter, a concurrent collection or immutable snapshot for shared reads. Mention deadlock risk and consistent lock ordering, and show a short example in C#, Java or C++.
Designing the 10,000-call simulator as one thread or one process per call, with metrics collected in a shared structure that every call writes to
Use asynchronous or event-driven workers with a bounded number of threads, a per-call state machine, and per-worker metric buffers (counters and latency histograms) merged periodically. Say how you apply backpressure and how you confirm the generator is not the bottleneck.
Describing a retry mechanism that retries every error immediately, with no cap, jitter or idempotency
Separate retryable failures (timeouts, 429, 5xx) from permanent ones (most 4xx). Use capped exponential backoff with jitter, honor a Retry-After header, set a total budget, add an idempotency key for non-idempotent calls, and mention a circuit breaker for a dependency that stays down.
Submitting a written answer that is only code, with no reasoning, edge cases or test plan
Follow the same order every time: assumptions, approach, code or pseudocode, edge cases, tests. Candidates describe the written stage as a place where clarity and documented trade-offs matter, so write as if a colleague will read the answer cold.
Treating load, stress and functional testing as synonyms, or naming no success metric for each, and telling a flaky-test story with "timing issues" as the root cause
Give each test type its own question and number: functional means correct behavior, load means targets such as latency percentiles and error rate at expected volume, stress means where and how the system breaks and recovers. For the flaky test, name the actual cause (shared state, race, real clock, unreliable network dependency) and the fix.
Questions & practice
How do you manage thread synchronization and prevent race conditions in a highly concurrent backend applicatio
Medium · High-Concurrency & System Design
How do you manage thread synchronization and prevent race conditions in a highly concurrent backend application?
Approach
- Start by shrinking shared mutable state: confine state to one thread or request, prefer immutable objects, and hand work between threads through a queue (BlockingQueue in Java, System.Threading.Channels in .NET) so fewer places need locking.
- Name the race before fixing it: check-then-act and read-modify-write sequences break under concurrency. Guard a compound invariant with one lock (synchronized, ReentrantLock, C# lock) and keep the critical section short, with no I/O or remote calls inside it.
- For single values, use atomics instead of locks: Interlocked.Increment, AtomicLong, or LongAdder for heavily contended counters. For maps, use the atomic operations on concurrent collections. ConcurrentHashMap.computeIfAbsent runs the factory at most once; ConcurrentDictionary.GetOrAdd can run its factory more than once.
- Cover visibility and deadlock: volatile and happens-before rules decide when another thread sees a write, and a fixed global lock order prevents deadlock. In C# async code you cannot await inside a lock block, so use SemaphoreSlim(1,1) with WaitAsync.
- Say how you would test it: run stress tests with many threads hitting the same key, use tools such as jcstress or ThreadSanitizer, and check the invariant afterwards (for example, the total is exactly N increments).
Follow-up
- The shared state lives in a database row, not memory. Would you use optimistic concurrency with a version column or SELECT ... FOR UPDATE, and why?
- A service hangs under load and you suspect a deadlock. What do you capture (thread dump, jstack, dotnet-dump), and what pattern in it confirms the deadlock?
- When does a lock-free CAS loop perform worse than a plain lock?
Identify the heaviest tenants in a five-minute window under memory pressure
Medium · top-k · heavy hitters · streaming
The edge service handles about 3,000 requests per second across roughly 50,000 tenants, peaking near 9,000. Expose the 50 heaviest tenants by request count over the trailing five minutes so limits can be tightened before one tenant's backfill starves the fleet. You may not retain five minutes of raw records. Give the exact solution and its memory, then the bounded-memory approximation with its error stated as a formula, and say which you would ship and at what tenant cardinality that choice changes.
Approach
- Do the exact version first, because it is affordable at this cardinality: a ring of 300 one-second counters per tenant, advanced lazily, is 1,200 bytes of counters per tenant and roughly 60 to 90 MB for 50,000 tenants with overhead. Carry a running total and subtract the bucket you overwrite so a window read is O(1) rather than 300 adds.
- Extract the top 50 with a size-k min-heap over the tenant sums: O(d log k) for d tenants, against O(d log d) to sort them all. Maintaining the heap continuously instead of on query requires a tenant-to-heap-index map, because incrementing a count already inside the heap means sifting from a known position, and without that map you rebuild the heap on every request.
- State the approximation precisely rather than gesturing at sketches. Misra-Gries with m counters retains every item whose true count exceeds N/(m+1), and each retained count underestimates the truth by at most N/(m+1). With m = 1,000 and N = 900,000 requests in the window the error is roughly 900 requests, which is fine for spotting a tenant sending 50,000 and useless for ranking two tenants 200 apart.
- Say what breaks when the window slides: Misra-Gries and Space-Saving are insert-only and cannot be decremented as records age out. The workable construction is one summary per sub-window, say ten seconds, with 30 summaries merged at query time, and the merged error is the sum of the per-summary errors, so the bound degrades linearly in the number of sub-windows.
Follow-up
- The heaviest tenant is heavy because of one export job rather than user traffic. Should the limiter treat those as the same tenant?
- Two tenants sit tied at the boundary of the top 50. Does your answer flap, and does the flapping matter?
Collapse a redelivered event batch into per-aggregate high-water marks
Easy · hashing · at-least-once · aggregation
You drain a batch of up to 5,000,000 events, each (aggregate_id BIGINT, aggregate_version INT, event_type, payload). The log guarantees order within one aggregate only; the batch merges 64 partitions, and a relay failover has redelivered a range, so an older version for an aggregate can appear after a newer one. Given a map of last_applied_version per aggregate, produce the events worth applying, at most one per (aggregate_id, version), plus the count discarded. Target O(n) time. State the memory for 2,000,000 distinct aggregates and what you do when it does not fit.
Approach
- One pass, one hash map from aggregate_id to the highest version kept, and a discard counter. An event whose version is at or below last_applied_version for its aggregate is dropped without further work, which is the whole reason the event carries its version rather than a delta. O(n) expected time, O(d) space in distinct aggregates.
- Keep the maximum, never the last occurrence. The redelivered range means the final appearance of an aggregate in the batch can be an older version than one seen earlier in the same batch, so last-wins applies stale state over newer state and the projection regresses with no error anywhere.
- Cost the memory instead of calling it large: an 8-byte key plus a 4-byte version is 12 bytes of payload, and an open-addressed table held at a 0.7 load factor costs roughly 17 bytes per entry before per-slot metadata, so 2,000,000 aggregates is tens of megabytes in a native layout and several times that in a runtime that boxes both key and value.
- If the distinct set exceeds memory, partition on hash(aggregate_id) mod P and reduce each partition independently. Every event for one aggregate hashes to the same partition, so the per-partition result is exact and the merge is concatenation rather than a second reduction.
Follow-up
- The payload is a patch rather than a snapshot, so applying only the highest version loses the intermediate changes. What changes in your reduction?
- How do you detect that version 7 arrived while version 6 was never delivered, and what should the consumer do about the gap?
Write the update path that detects a concurrent edit
Medium · optimistic concurrency · transactional outbox · audit history
resource carries version INT NOT NULL DEFAULT 1. resource_revision holds revision_id, resource_id, version, actor_user_id, change_kind, patch JSONB, request_id, created_at with UNIQUE (resource_id, version). outbox_event holds aggregate_type, aggregate_id, aggregate_version, event_type, payload, status. A PUT carries the version the client read. Write the exact statements for the single transaction that applies the edit, records the revision and enqueues 'resource.updated', and give the handler's branch on zero affected rows. Then say what PostgreSQL 16 does under READ COMMITTED when two of these updates hit one row at once.
Approach
- One transaction, three writes, no network call inside it: UPDATE resource SET title = $3, version = version + 1, updated_at = now() WHERE resource_id = $1 AND tenant_id = $4 AND version = $2; then INSERT the resource_revision row at version $2 + 1; then INSERT the outbox_event row at the same aggregate_version. The event goes to a table rather than a broker because no transaction spans both.
- Branch on the affected-row count before doing anything else. Zero has three causes — stale version, wrong tenant, row gone — so re-read once and map to 409 carrying the current version, or 404 for an id outside the caller's tenant, which also stops the endpoint confirming that another tenant's id exists.
- State the engine behaviour instead of assuming it. Under READ COMMITTED the second UPDATE blocks on the row lock, and when the first commits PostgreSQL re-evaluates the WHERE clause against the newly committed row, so the version predicate now fails and the statement reports zero rows. Under REPEATABLE READ the identical collision raises SQLSTATE 40001 instead, so the handler must fold both shapes into one conflict response.
- Keep UNIQUE (resource_id, version) even though the predicate already serialises writers. It is what makes a lost update unwritable if any other path ever reaches the revision table, and it converts a logic bug into 23505 rather than into a silently missing history row.
Follow-up
- A client sends the version it read ten minutes ago and the resource has moved three versions. What is in your 409 so it can resolve the conflict without a full re-fetch?
- Two editors, two disjoint fields, no overlap. Does your answer still refuse the second write, and should it?
Hold a per-tenant active cap against concurrent creates
Hard · write skew · isolation levels · constraints
A tenant on the standard plan may hold at most 50 resources with status='active'. The create handler runs SELECT count(*) FROM resource WHERE tenant_id = $1 AND status = 'active', compares to 50, then inserts. Two creates arrive 3 ms apart on different instances and the tenant lands at 51. Name the anomaly, say whether PostgreSQL 16 READ COMMITTED or REPEATABLE READ prevents it and why, then give an implementation that holds the cap at READ COMMITTED with the exact statements. Finally, say what changes when the cap is 'at most one running export per tenant' on job_run.
Approach
- Name it: write skew. The two transactions read an overlapping set and write disjoint rows, so there is no row-level conflict for the engine to detect and each commit is individually legal.
- Rule out the levels precisely. READ COMMITTED takes a fresh snapshot per statement and takes no lock on the counted rows, so both see 49. PostgreSQL's REPEATABLE READ is snapshot isolation: it removes non-repeatable reads and phantoms within the snapshot but still admits write skew, because the anomaly is not a re-read of a changed row, it is a read of a set that a concurrent transaction invalidates. Only SERIALIZABLE closes it, by tracking the read dependency and aborting one transaction with SQLSTATE 40001 — a guarantee that exists only if the application re-runs the whole transaction from the read.
- Convert the set predicate into a single-row conflict: keep tenant.active_resource_count and run UPDATE tenant SET active_resource_count = active_resource_count + 1 WHERE tenant_id = $1 AND active_resource_count < 50 in the same transaction as the INSERT. Zero affected rows is the cap, returned as 409. The row lock serialises the decision at any isolation level, and contention is bounded to one tenant's row — which is also the fair-scheduling unit, unlike a global counter that would convoy every tenant behind one row.
- State the cost you just took on: a counter is a second source of truth that can drift, so every path that changes status must adjust it inside the same transaction, and a periodic reconciliation has to exist, with resource_revision as the authority for what the count should have been.
Follow-up
- A resource moves from archived back to active. Which statements change, and what breaks if the counter update and the status change land in different transactions?
- The cap becomes plan-dependent and a plan can change mid-month. Where does the number 50 live, and who reads it?
Describe how you would design a system to simulate 10,000 concurrent voice calls while maintaining real-time p
Medium · High-Concurrency & System Design
Describe how you would design a system to simulate 10,000 concurrent voice calls while maintaining real-time performance metrics.
Approach
- Split it into a controller (scenario definitions, ramp schedule, test state) and a horizontally scaled fleet of load-generator agents, each running a fixed share of calls. Each call has SIP signalling plus an RTP media stream, so size both.
- Do the capacity arithmetic aloud. G.711 at 20 ms packetisation sends 50 packets/s per direction, about 80 kbps at the IP layer (160-byte payload plus 40 bytes of IP/UDP/RTP headers). 10,000 calls is about 500k packets/s and roughly 800 Mbps each way, which sets the agent count and NIC needs.
- Inside an agent, use event-driven I/O and a timer wheel instead of a thread per call. Send pre-encoded audio so CPU is not spent transcoding, and ramp calls per second gradually so the target does not receive an INVITE storm.
- Compute metrics at the edge: setup time (INVITE to 200 OK), success/failure by SIP response code, RFC 3550 interarrival jitter, loss and an estimated MOS. Each agent ships per-interval histograms (HdrHistogram or t-digest) rather than raw packets. Percentiles must be merged from histograms, never averaged across agents.
- Handle failure and validity: send agent heartbeats so a dead agent is not counted as target failures, keep clocks NTP-synced, and monitor agent CPU and send-timing drift. A saturated generator then shows up as its own problem, not as target latency.
Follow-up
- How do you prove the load generator, not the system under test, is the bottleneck when latency climbs?
- The target starts answering 503 at 6,000 calls. What should the simulator do, and how is that reported?
- How would you add WebRTC calls to the same harness, and what does that cost per call?
What strategies do you use to optimize database queries and connection pooling under heavy read/write loads?
Medium · High-Concurrency & System Design
Approach
- Measure before tuning: use the slow query log, pg_stat_statements or SQL Server Query Store to find the queries with the most total time, then EXPLAIN (ANALYZE) them. Fix with composite indexes in the column order of the WHERE and ORDER BY (leftmost prefix), covering indexes, removing N+1 loops, and keyset pagination instead of large OFFSETs.
- Size the pool for the database, not the app. Past a small multiple of the DB's cores, extra connections add contention. HikariCP's starting formula is cores * 2 + effective spindle count. Instances times pool size must stay below max_connections, so add PgBouncer or a similar proxy when the instance count grows.
- Configure the pool deliberately: set a connection-acquire timeout so callers fail fast instead of queueing forever, and a max lifetime shorter than any firewall or DB idle cutoff. Never hold a connection across a remote call. Transaction-mode pooling breaks session state such as SET or advisory locks.
- Handle reads and writes separately. For reads, use replicas (and handle replication lag for read-your-writes) and a cache with explicit invalidation. For writes, batch inserts (multi-row INSERT, JDBC batch, SqlBulkCopy), keep transactions short, and spread hot rows such as a single counter across several rows.
- Name the trade-offs: every index slows writes and costs memory, replicas add staleness, and a cache adds an invalidation path that has to be tested.
Follow-up
- Under load the app logs 'timeout acquiring connection' while the database CPU sits at 30 percent. What do you check first?
- A user writes and immediately reads stale data from a replica. How do you fix that without sending all reads to the primary?
- When would you denormalise or add a summary table instead of another index?
Explain the architectural differences between WebRTC and traditional SIP-based VoIP communication.
Medium · High-Concurrency & System Design
Approach
- SIP (RFC 3261) is a text-based signalling protocol over UDP, TCP or TLS that uses SDP offer/answer to negotiate media. Media flows separately over RTP/RTCP, often unencrypted or SRTP keyed via SDES. The network is built from user agents, registrars, proxies, B2BUAs and session border controllers.
- WebRTC is a browser API plus a protocol stack that deliberately leaves signalling unspecified: the application picks WebSocket, HTTP or even SIP over WebSocket (RFC 7118). It still uses SDP offer/answer, but in JSEP form.
- Media differences: WebRTC requires ICE (STUN, plus TURN relays when NAT blocks direct paths) and mandatory DTLS-SRTP encryption, and it usually bundles all media with RTCP onto one port. Opus and G.711 are its mandatory audio codecs, and it adds data channels over SCTP/DTLS. Classic SIP deployments usually rely on SBCs or media relays for NAT.
- Bridging the two needs a gateway. It translates signalling, terminates ICE and DTLS-SRTP toward the browser while speaking plain RTP or SDES-SRTP toward the SIP side, and transcodes (for example Opus to G.711) when no codec is shared, which adds latency and CPU cost.
- Tie it to testing: a raw SIP/RTP endpoint is cheap to simulate in bulk. A WebRTC endpoint needs a full ICE/DTLS stack or a headless browser, so per-call cost and the metrics sources differ: RTCP reports versus the getStats() API.
Follow-up
- When is a TURN server required, and what does relaying all media through it cost?
- How does a call that starts in a browser reach a phone number on the PSTN?
- Where would you read jitter and packet loss on each side of a WebRTC-to-SIP call?
Provide a detailed explanation of how you would implement a custom retry mechanism for a failing third-party A
Medium · Technical & Written Screening
Provide a detailed explanation of how you would implement a custom retry mechanism for a failing third-party API.
Approach
- Classify failures first. Retry transient ones: timeouts, connection resets, 429, 502, 503, 504. Do not retry 400, 401, 403, 404 or 422. Honour a Retry-After header when the provider sends one.
- Use capped exponential backoff with jitter, for example full jitter: sleep = random(0, min(cap, base * 2^attempt)). Set a maximum attempt count and an overall deadline so clients that failed together do not retry in sync and the caller is not blocked past its own timeout.
- Make retries safe. GET, PUT and DELETE are idempotent by HTTP semantics, but a POST needs an idempotency key that the provider honours. A timeout is ambiguous because the request may have succeeded, so reconcile by querying status before resending.
- Stop amplifying an outage. Put a circuit breaker (closed, open, half-open) and a retry budget in front of the client, and retry at one layer only: 3 attempts at each of 3 nested layers can turn one request into 27 calls. Libraries such as Polly (.NET) or Resilience4j (Java) implement these pieces.
- For long outages, move the work to a durable queue with a dead-letter queue instead of in-process loops. Emit per-attempt metrics, and test the mechanism with a fake server that injects failures and an injectable clock so tests never really sleep.
Follow-up
- The API timed out but actually processed the payment. How does your design avoid charging twice?
- How would you unit-test the backoff schedule without waiting for real time to pass?
- Should the retry live in the client library or in a queue worker, and what decides it?
Write a script or pseudocode to parse a complex system log and extract specific performance bottlenecks.
Medium · Technical & Written Screening
Approach
- Pin down the format before writing code: timestamp format and timezone, whether a request ID links start and end lines, and whether multi-line entries such as stack traces occur. Stream the file line by line so memory stays constant, and parse with a regex that uses named groups.
- Treat bad input as data: count malformed lines and report a sample instead of crashing, and handle rotated or gzipped files. When there is no explicit duration field, pair start and end events by request ID in a hash map and report orphans.
- Define 'bottleneck' concretely. Group by operation or endpoint and compute count, p50, p95, p99 and total time (count times mean). Total time finds what costs the most overall; p99 finds what hurts individual requests.
- State the complexity: one O(n) pass with O(k) memory for k groups if you keep streaming histograms. Exact percentiles need the durations stored and sorted, O(m log m) per group. A heap gives the top k slowest requests in O(n log k).
- Bucket by minute to show when latency spiked and correlate it with errors or GC lines. Output a sorted table, and write the pseudocode with small, named functions (parse, aggregate, report) and a test on a short sample log.
Follow-up
- The logs are 50 GB spread across 20 hosts. What changes in your approach?
- Lines arrive out of order and the hosts' clocks differ by a few seconds. How does that affect paired durations?
- How would you tell a slow downstream dependency apart from slow code in the service itself?
Explain the lifecycle of a network packet in a VoIP environment, highlighting potential areas where latency or
Medium · Technical & Written Screening
Explain the lifecycle of a network packet in a VoIP environment, highlighting potential areas where latency or packet loss could occur.
Approach
- Walk the sender side: audio capture and A/D conversion, codec framing and look-ahead (G.729 uses 10 ms frames plus 5 ms look-ahead), and packetisation (often 20 ms of audio per packet) into RTP/UDP/IP. Packetisation interval trades header overhead against delay.
- Then the network: OS socket buffers and NIC queues, Wi-Fi contention and retransmission, router queues under congestion (bufferbloat), QoS marking (DSCP EF, value 46), NAT, firewalls and SBCs. Propagation adds roughly 5 microseconds per km of fiber.
- Name where loss happens: tail drops in congested queues, policers, Wi-Fi interference, and NAT bindings that expire and cause one-way audio. Because media runs over UDP, lost packets are not retransmitted, and a packet that arrives after its playout time counts as lost.
- Receiver side: the jitter buffer trades added delay for fewer late-packet losses (fixed versus adaptive), then packet loss concealment, decoding and playout. Any transcoding hop at a media gateway adds delay as well. ITU-T G.114 puts acceptable one-way delay for most uses at up to 150 ms.
- Close with measurement. RTCP receiver reports carry fraction lost and interarrival jitter, and round-trip time comes from the LSR/DLSR fields. Those numbers localise the problem to a hop or a direction.
Follow-up
- A caller hears the agent but the agent hears nothing. What do you check first?
- Why is RTP carried over UDP rather than TCP, and what would TCP do to a live call?
- How would you choose between a fixed and an adaptive jitter buffer?
What is the difference between load testing, stress testing, and functional testing, and how do you determine
Medium · Testing Methodologies & Automation
What is the difference between load testing, stress testing, and functional testing, and how do you determine the success metrics for each?
Approach
- Functional testing checks behaviour against requirements at any load. For example, a menu choice routes the call to the right queue or an API returns the right result. Success is pass/fail assertions and traceability to each requirement, including negative and edge paths.
- Load testing applies the expected and peak-expected workload, built from a real traffic profile, and holds it. Success is stated as SLOs at that load: p95/p99 latency, error rate, sustained throughput and resource headroom (for example CPU below a set ceiling). Use percentiles, not averages.
- Stress testing pushes past expected capacity to find the breaking point and how the system fails. Success means it degrades gracefully (sheds load or returns 503 instead of crashing), keeps data intact, and recovers once load drops. Record which resource saturated first.
- Mention the neighbours: soak tests run normal load for a long period to expose leaks and slow growth, and spike tests apply a sudden jump. Compare each run to a baseline so a regression is visible.
- Check validity before trusting any number: the generator must not be saturated, coordinated omission must be handled so queued requests are not dropped from the latency figures, and the test environment's size must be stated.
Follow-up
- There is no production traffic data yet. How do you pick the target load for a load test?
- Your stress test shows the system recovering slowly after load drops. What would you investigate?
- Which of these three would you run on every commit, and which on a schedule?
How do you design an automated test suite for an application that relies heavily on asynchronous events and th
Medium · Testing Methodologies & Automation
How do you design an automated test suite for an application that relies heavily on asynchronous events and third-party webhooks?
Approach
- Layer the suite. Unit-test handlers as pure logic with payload builders. Run contract tests against the provider's webhook schema and signature scheme (for example HMAC verification and timestamp tolerance), with consumer-driven contracts such as Pact where both sides agree to them.
- For integration tests, run a local fake of the third party (WireMock or a small HTTP server) that can send webhooks on demand. Script the cases that break real systems: duplicate deliveries, out-of-order events, delayed events, malformed bodies and bad signatures.
- Never assert after a fixed sleep. Poll for the expected state with a timeout (Awaitility in Java, a retry-until helper in .NET or JS), inject a fake clock for time-based logic, and tag events with correlation IDs so tests can wait for exactly their own event.
- Test the guarantees explicitly. The same event delivered twice must produce one effect (idempotency key or dedup table). A handler that returns 500 must leave the event retryable. A crash between commit and ack must not lose the event (outbox or ack-after-commit).
- Keep a small end-to-end set against the provider's sandbox that runs on a schedule rather than gating every commit, because external flakiness should not block merges. Track pass rates so a degrading dependency is visible.
Follow-up
- The provider sends 'updated' before 'created'. How should the consumer behave, and how do you test it?
- How do you stop the sandbox end-to-end tests from becoming the flaky part of the pipeline?
- How would you test that no events are lost when the consumer restarts during processing?
Describe a time when you had to debug a flaky automated test. What was the root cause, and how did you resolve
Medium · Testing Methodologies & Automation
Describe a time when you had to debug a flaky automated test. What was the root cause, and how did you resolve it?
Approach
- Open with the measured symptom: which test, how often it failed (for example 1 run in 40), and in which environment. Then say how you reproduced it, by running it in a loop or with a repeat flag in CI, collecting logs, timestamps and random seeds for failing runs.
- Show a systematic sort through the usual causes: timing assumptions around async work (fixed sleeps), shared state or test-order dependence (run alone and in random order), dependence on time or timezone, real network or ports, leaked resources, and a genuine race in the product code.
- Name the actual root cause and the evidence that confirmed it, for example 'I logged event timestamps and saw the assertion ran before the message handler committed.' Separate the trigger, such as a slower CI runner, from the cause.
- Describe a fix that removes the cause: wait on a condition instead of a sleep, give each test its own data, use a fake clock, or fix the product race. Verify it with many consecutive clean runs. Adding an automatic retry and stopping there is the answer that sinks this story.
- End with what changed afterwards: a quarantine rule with an owner, flake-rate tracking, or a shared test helper that stops the same pattern recurring. Say in the first person what you did.
Follow-up
- How did you prove the fix worked, rather than the failure just becoming rarer?
- Was the defect in the test or in the product, and how did you decide?
- What would you do if the flaky test blocked a release and the root cause was still unknown?
Suggested practice checklist
Each day targets one cluster of the reported questions: telephony background, concurrency, call-simulator design, databases and retries, the written stage, testing, and a final run-through with behavioral stories and logistics.
Day 1 — Telephony basics: SIP, WebRTC and the packet path
- Write a one-page comparison of SIP-based VoIP and WebRTC: signalling, media transport, NAT traversal, encryption and where each runs.
- Draw a VoIP packet's journey from sender to receiver and mark where latency, jitter and packet loss appear.
- Explain TCP versus UDP for real-time media in three sentences you could say aloud.
Deliverable: A one-page SIP-versus-WebRTC comparison and an annotated packet-path diagram.
Day 2 — Thread synchronization and race conditions
- Write a small program in C#, Java or C++ that corrupts a shared counter and a shared dictionary from many threads, then fix each with a different primitive.
- Write down when you would choose a lock, an atomic, a concurrent collection or an immutable snapshot, and one deadlock scenario.
Deliverable: Working code showing a race and its fix, plus a decision note on choosing a synchronization tool.
Day 3 — Design the 10,000-call simulator
- Sketch the architecture: scheduler, workers, per-call state, media versus signalling, and a metrics pipeline.
- Estimate worker capacity: how many simulated calls one worker can hold, and what limits it (sockets, CPU, memory).
Deliverable: A labeled architecture diagram with a one-paragraph answer on what breaks first at ten times the load.
Day 4 — Database tuning and a custom retry mechanism
- Write an answer on query and pool tuning: indexes, plans, batching, pool size against connection limits, and replicas versus caches.
- Implement a retry helper with capped exponential backoff and jitter, a retry budget and an idempotency key.
- List which errors from a third-party API you would retry and which you would not.
Deliverable: A tuning checklist plus a tested retry helper with a table of retryable and non-retryable errors.
Day 5 — Written-stage rehearsal: log parsing
- Write the script or pseudocode that parses a multi-line system log and reports the slowest operations with percentiles.
- Add edge cases in writing: malformed lines, clock skew, a file too large for memory.
- Write a short test plan for the script and have someone read the whole answer cold.
Deliverable: One complete written answer in the assumptions, approach, code, edge cases, tests format.
Day 6 — Testing methodology and automation
- Write definitions of load, stress and functional testing with a success metric for each.
- Design a test suite for a service driven by asynchronous events and third-party webhooks: fake the third party, wait on conditions rather than sleeping, and assert on events.
- Write your flaky-test story with cause, evidence and fix.
Deliverable: A one-page testing strategy and a written flaky-test story.
Day 7 — Full run-through, behavioral stories and logistics
- Answer the 10,000-call design and the race-condition question aloud, back to back, to a listener or recording.
- Write down your availability, compensation expectations and timeline so you can state them early.
Deliverable: A recorded run-through, three behavioral stories, and a logistics note.
Behavioral preparation for Cyara
The one behavioral prompt candidates report is about a flaky automated test. Candidates also describe the process as covering how you work in agile teams, handle tight deadlines and align engineering choices with business goals, and a testing mindset is a theme throughout. Prepare stories with a concrete cause, the evidence you used and a result.
- Describe a time when you had to debug a flaky automated test. What was the root cause, and how did you resolve it?
- Tell me about working in an agile team under a tight deadline: what you cut, what you protected and how you communicated the trade-off.
- Describe an engineering decision you made or changed because of what a customer or the business needed.
- Tell me how you test your own code: what you cover with unit tests, what with integration tests and what you decided not to automate.
- Describe a design you argued against and lost. What did you do after the decision was made?
Argue against a design, lose, and commit anyway
Medium · disagreement · service boundaries · decision records
Describe a design you argued against and lost. State the failure you predicted as a named mechanism, not a feeling about complexity: two services that would need one transaction, a projection with no rebuild path, a write path with no idempotency key. Say what evidence you brought, what the decision maker weighed instead, and what you did after the decision was made: what you instrumented, what you wrote down, and whether the prediction came true. Five minutes.
Approach
- State the prediction in falsifiable form up front: the mechanism, the condition that triggers it, and the observable outcome. A prediction that cannot be checked also cannot be credited to you later.
- Show the evidence you had at the time and label each piece honestly as measured, analogous, or intuition. Keeping the intuition is fine; disguising it as data is the thing that erodes your standing in the next argument.
- Represent the opposing case at full strength, including the constraint you did not control: a fixed date, a team boundary, or the fact that the decision was cheap to reverse and yours was not.
- Make disagree-and-commit concrete. Name the artefact you left behind so the prediction could be settled without you: the alert and its threshold, the counter on the dashboard, the decision note that recorded the trade-off and the condition that would revisit it.
Follow-up
- What threshold on that alert would have proved you right, and did anyone ever look at it?
- If the same proposal arrived tomorrow with the same deadline, would you argue it the same way?
Tell callers you do not own that their integration breaks
Medium · deprecation · compatibility · stakeholders
A field in a write endpoint's response must change shape. You own the endpoint; you do not own the four internal callers or the outbound webhook consumers who read it. Describe a deprecation you were responsible for: what you shipped first, how you established who was actually reading the field, the window you gave and what set its length, what you did about the consumer who never moved, and how you decided removal was safe. Name the signal you used, not the announcement you sent.
Approach
- Establish the reader set empirically rather than from a wiki of owners: per-field usage counters keyed by principal, or access logs attributed to a consumer. State the blind spot of whichever you pick, since a consumer that reads the field only on a monthly job will not appear in a week of logs.
- Ship additive first. Populate the new field alongside the old one so no reader is forced to move, which is also what keeps a rolling deploy safe, because old and new instances answer the same requests at the same time and a rollback must still find the old shape present.
- Set the window from the slowest legitimate consumer's release cadence, not from your calendar, and decide separately what to do for a consumer with no release process at all, such as an external webhook endpoint you can only email.
- Convert silence into evidence before you rely on it: a short, low-traffic removal window that makes a still-dependent consumer fail visibly and loudly while you are watching, rather than at three in the morning after you have moved on.
Follow-up
- How would you detect a consumer that reads the field only during a monthly export?
- One caller refuses to move and has a commercial relationship behind it. What changes in your plan and what does not?
Reverse your own decision and price the reversal
Medium · reversibility · measurement · migrations
Describe a technical decision you made and later reversed. Pick one that cost something: a service you split and merged back, a cache you added and removed, an index you created that pushed the planner onto a worse plan, a projection you rebuilt from scratch. State what you believed when you decided, the measurement that changed your mind, how long the wrong version ran in production, and what the reversal cost in migrations, dual writes, and a deprecation window for callers you did not own.
Approach
- State the original rationale without irony, in the version you would still defend given what was known then. If it is not defensible, the story is about carelessness rather than judgement, and a different example serves you better.
- Give the measurement that moved with a before and after: the p99 that did not improve, the cache hit rate that sat at 40%, the plan that flipped to a sequential scan once the table passed a size you can name.
- Cost the reversal in steps, not adjectives: expand-and-contract deploys, the dual-write window, the callers who had to be notified, the rows already written in the wrong shape that had to be backfilled or abandoned.
- Distinguish reversal from rewrite by naming what you kept. Most good reversals preserve the schema or the interface and undo one decision inside it, which is also why they were affordable.
Follow-up
- What in that decision was irreversible, and did you know it was irreversible when you made it?
- How did you tell the people who had already built on top of the original decision?