Booking.com interview questions & answers

20 real Booking.com interview questions with full model answers — System design, Behavioral, Technical, Coding. Drawn from the same verified bank ChannelPulse drills from (138 Booking.com questions in total).

BehavioralEasyBooking.com

1. Tell me about a time when you had to work with a diverse team to achieve a common goal.

Model answer

Situation

In my previous role at a tech company, I was part of a project team tasked with developing a new feature for our booking platform. The team was diverse, comprising members from different cultural backgrounds and professional disciplines, including developers, designers, and product managers. The stakes were high as the feature was expected to significantly enhance user engagement and drive revenue growth.

Task

My specific responsibility was to lead the development team and ensure seamless integration of the new feature with our existing system. The key challenge was to harmonize the diverse perspectives and working styles within the team to achieve our common goal within a tight deadline.

Action

  • I initiated a series of team-building activities to foster a collaborative environment and help team members appreciate each other's unique contributions. This included informal meet-ups and cultural exchange sessions.
  • To ensure clear communication, I established a regular meeting schedule where each team member could share updates and voice any concerns. I encouraged open dialogue and made it a point to actively listen, addressing any misunderstandings promptly.
  • Recognizing the varied expertise within the team, I delegated tasks based on individual strengths and encouraged cross-functional collaboration. For example, I paired developers with designers to work on user interface elements, which led to more innovative solutions.
  • I facilitated workshops on cultural sensitivity and effective communication to bridge any gaps arising from cultural differences. This not only improved team dynamics but also enhanced overall productivity.
  • Throughout the project, I maintained a positive and inclusive atmosphere by celebrating small wins and acknowledging individual contributions, which kept the team motivated and focused.

Result

The project was completed on time and the new feature was successfully launched, resulting in a 20% increase in user engagement within the first month. The collaborative approach not only met the project goals but also strengthened team cohesion and morale. From this experience, I learned the importance of leveraging diversity as a strength and the value of empathy and open communication in achieving team success.

BehavioralMediumBooking.comEngineering ManagerStakeholder Round

2. How do you handle project trade-offs and delays?

Model answer

Situation

On a recent project, my team was building a self-service workflow used by several thousand customers. Midway through delivery, an upstream dependency slipped by three weeks, while a fixed launch date and a commitment to reliability remained. The delay put both the launch and the team’s credibility at risk.

Task

I owned getting stakeholders aligned on a realistic plan without silently sacrificing quality or burning out the team. The central trade-off was deciding what could safely move out of the first release and what had to remain.

Action

  • I first re-established the facts with the engineers: remaining work, dependency uncertainty, critical-path items, test coverage, and a range for delivery rather than a single optimistic date. I separated confirmed work from assumptions.
  • I asked the product and partner teams to agree on the customer outcome that mattered most. We compared three options: move the date, reduce scope, or add capacity. I explained that adding people would not accelerate the dependency and would create coordination overhead.
  • I recommended a phased launch: keep the core workflow, security checks, and monitoring in scope; defer a lower-use reporting feature; and release to a small cohort first. I made the customer and operational risks explicit rather than presenting scope reduction as free.
  • I assigned owners to the dependency, rollout, and deferred work, and set short checkpoints with clear evidence required to change the plan. I also reserved time for integration and rollback testing instead of treating it as optional schedule slack.
  • When the dependency slipped again, I communicated the impact early, presented the updated options, and recorded the decision and revised commitments in one place. I protected the team from repeatedly changing priorities based on informal escalations.

Result

We launched the core workflow two weeks after the original target, with no critical reliability issues, and delivered the deferred feature in the next release. The phased rollout let us validate the experience with real customers before broadening access. I learned that managing a delay is less about defending a date and more about making uncertainty, customer impact, and decision ownership visible early.

What interviewers listen for

  • Clear ownership and early, evidence-based communication.
  • Explicit trade-offs among scope, date, quality, and team health.
  • A measurable customer outcome, not schedule theater.
  • A learning loop that improves future estimation and dependency management.
BehavioralMediumBooking.comDirector of Technical Program ManagementBusiness interview

3. Can you share examples of how you managed C-level stakeholders and lessons you learned from those experiences?

Model answer

Situation — I led a multi-quarter platform modernization involving several product and engineering organizations. The work required investment from multiple executives, and the leaders had different priorities: one was focused on customer-facing delivery, another on reducing operational risk, and a third on controlling near-term spend. Without alignment, teams were likely to optimize locally and miss the program’s intended outcome.

Task — I owned the operating cadence and executive alignment: make the choices understandable, surface risks early, and secure timely decisions without turning every delivery issue into an executive escalation.

Action

  • I started by meeting each executive to understand their goals, constraints, and preferred level of detail. I translated those perspectives into a common set of outcomes, including customer impact, reliability, delivery timing, and cost.
  • I created a concise program brief that connected the investment to measurable business results. It separated facts, assumptions, risks, and decisions needed, so the leadership conversation focused on choices rather than status narration.
  • I established a regular review cadence with a one-page dashboard and a decision log. I kept routine execution detail with the teams and reserved executive time for cross-org dependencies, risk acceptance, and trade-offs that required their authority.
  • When a dependency threatened the launch date, I presented options with consequences: reduce scope, add capacity at a cost, or move the date. I made a recommendation, explained its assumptions, and asked the accountable executive to decide by a specific date.
  • I closed the loop after each decision by communicating it to affected teams, confirming owners, and checking whether the expected outcome materialized. I also raised bad news early, with a mitigation plan, rather than waiting for a polished status report.

Result — The executives aligned on a phased investment and a smaller initial scope, allowing teams to deliver the critical capability while controlling risk and cost. The program met its agreed launch milestone, and the shared dashboard reduced late surprises and repeated decision cycles. I learned that executive management is less about presenting more information and more about making the few consequential choices clear, timely, and actionable.

What interviewers listen for

  • Ability to tailor communication without changing the underlying facts.
  • Clear recommendations, options, and decision rights.
  • Early escalation with mitigation, not surprise or blame.
  • Evidence of alignment translating into execution and business outcomes.
BehavioralMediumBooking.comEngineering ManagerStakeholder Round

4. How do you handle stakeholder conflict?

Model answer

Situation

At a previous company, Product wanted to launch a new onboarding flow before a major marketing campaign, while Security had identified a data-retention concern that needed remediation. Both leaders had legitimate goals, and each viewed the other’s position as putting their own commitment at risk. The disagreement was starting to spill into engineering planning and create conflicting requests for the team.

Task

As the engineering manager, I needed to resolve the decision at the right level, protect the team from being pulled in two directions, and make sure we met our customer and risk obligations. I was not there to “win” for Engineering; I was responsible for surfacing options and helping the accountable leaders make a decision.

Action

  • I met each stakeholder individually to understand the underlying need, not just the requested solution. Product needed a campaign-ready experience; Security needed evidence that sensitive data would not be retained beyond policy.
  • I brought the relevant facts together: the campaign date, the specific risk, the affected data, remediation effort, and the cost of delaying either outcome. I asked the team to distinguish a launch blocker from a follow-up improvement.
  • I facilitated a joint discussion around options. We considered delaying launch, launching the full flow, and a constrained launch that excluded the risky data path. I made the customer impact, residual risk, and reversibility of each option explicit.
  • I proposed a staged release behind a feature flag: launch the safe onboarding path for a limited cohort, keep the affected path disabled, and complete the retention fix before expanding. Security owned the risk acceptance criteria; Product owned the launch scope; Engineering owned implementation and operational readiness.
  • I documented the decision, owners, and trigger for expanding the rollout. When new information emerged, I reconvened the decision-makers rather than letting teams interpret the agreement differently.

Result

We supported the campaign with a limited launch, completed the remediation before enabling the full flow, and avoided both an unreviewed risk and a needless all-or-nothing delay. The teams later reused the same decision process for other launches. I learned to make conflict productive by clarifying shared outcomes, decision rights, and evidence—not by relying on title or consensus for its own sake.

What interviewers listen for

  • Listening for interests beneath stated positions.
  • Risk-aware options and clear decision ownership.
  • Direct, respectful facilitation and durable alignment.
  • A concrete outcome and a repeatable learning.
CodingEasyBooking.comSoftware Engineer

5. Roman to Integer (LeetCode)

Model answer

The task

Convert a string of Roman numeral symbols into its integer value. Roman numerals use a small set of symbols, with some smaller values placed before larger ones to indicate subtraction.

Key idea

Scan the string from left to right, comparing each symbol’s value with the next one. If the current value is smaller, subtract it; otherwise, add it. This handles subtractive pairs without needing to process them separately.

Approach

  1. Store the integer value for each Roman numeral symbol in a lookup table.
  2. Initialize a running total to zero.
  3. For each symbol, compare its value with the following symbol’s value, if one exists.
  4. Subtract the current value when it is smaller than the next value; otherwise, add it.
  5. Return the total. This assumes the input is a valid Roman numeral.
class Solution:
    def romanToInt(self, s: str) -> int:
        values = {
            "I": 1,
            "V": 5,
            "X": 10,
            "L": 50,
            "C": 100,
            "D": 500,
            "M": 1000,
        }

        total = 0

        for i, symbol in enumerate(s):
            current = values[symbol]

            # A smaller value before a larger value is subtracted.
            if i + 1 < len(s) and current < values[s[i + 1]]:
                total -= current
            else:
                total += current

        return total

Complexity: Time: O(n), where n is the string length, since each symbol is visited once.

Complexity: Space: O(1), because the lookup table has a fixed number of entries.

Common follow-ups

  • How would you handle invalid Roman numeral strings? Validate symbol order and repetition rules before or during conversion.
  • How would you convert an integer to a Roman numeral? Greedily subtract from a descending list of allowed values, including subtractive pairs.
  • Can the conversion be done scanning right to left? Yes; subtract a value if it is smaller than the largest value already seen to its right, otherwise add it.
CodingEasyBooking.comSoftware Engineer

6. Valid Parentheses (LeetCode)

Model answer

The task

Determine whether a string of opening and closing round, square, and curly brackets is correctly nested and matched. Return a boolean.

Key idea

A closing bracket must match the most recent unmatched opening bracket. A stack captures that order: push openings, and check each closing bracket against the stack’s top.

Approach

  1. Return False if the string has odd length.
  2. Map each closing bracket to its matching opening bracket.
  3. Scan the string from left to right.
  4. Push opening brackets onto the stack.
  5. For a closing bracket, return False if the stack is empty or its top does not match; otherwise pop.
  6. Return True only if the stack is empty after the scan.
class Solution:
    def isValid(self, s: str) -> bool:
        pairs = {")": "(", "]": "[", "}": "{"}
        openings = set(pairs.values())
        stack = []

        for char in s:
            if char in openings:
                stack.append(char)
            else:
                # A closing bracket must match the latest unmatched opening.
                if not stack or stack[-1] != pairs.get(char):
                    return False
                stack.pop()

        # Unmatched opening brackets make the sequence invalid.
        return not stack

Complexity:

  • Time: O(n), where n is the string length; each character is processed once.
  • Space: O(n) in the worst case, when all characters are opening brackets.

Common follow-ups

  • How would you support additional bracket types? Add their matching pairs to the map.
  • Can you stop early? Yes; return False as soon as a closing bracket mismatches or has no opening bracket.
  • What if the input includes non-bracket characters? Define how to handle them, then either ignore them or reject them during the scan.
CodingEasyBooking.comSoftware Engineer

7. Two Out of Three (LeetCode)

Model answer

The task

Return the distinct values that appear in at least two of the three input arrays. Repeated occurrences within a single array count only once.

Key idea

Track which arrays contain each value using a bitmask. Each array sets a different bit, so a value qualifies when its mask has at least two bits set.

Approach

  1. Create a map from each value to a bitmask, initially zero.
  2. Convert each array to a set so duplicates do not count more than once.
  3. For each set, mark its corresponding bit for every value.
  4. Return the values whose masks have at least two bits set.
from typing import List

class Solution:
    def twoOutOfThree(
        self, nums1: List[int], nums2: List[int], nums3: List[int]
    ) -> List[int]:
        masks = {}

        # Set one distinct bit for each array containing a value.
        for bit, nums in enumerate((nums1, nums2, nums3)):
            for value in set(nums):
                masks[value] = masks.get(value, 0) | (1 << bit)

        return [value for value, mask in masks.items() if mask.bit_count() >= 2]

Complexity:

  • Time: O(n), where n is the total number of elements across the arrays.
  • Space: O(u), where u is the number of distinct values.

Common follow-ups

  • How would you handle k arrays? Use one bit per array and count set bits in each value’s mask.
  • What if the input arrays are streamed? Update each value’s mask as elements arrive, while tracking values that reach two bits.
  • Does the order of results matter? If a specific order is required, sort the result, adding O(u log u) time.
CodingEasyBooking.com

8. Given an array of integers representing the prices of hotel rooms over a week, write a function to find the maximum profit you can achieve by buyin…

The full question

Given an array of integers representing the prices of hotel rooms over a week, write a function to find the maximum profit you can achieve by buying on one day and selling on another. You cannot sell a room before you buy it.

Model answer

function maxProfit(prices) {
    if (prices.length === 0) return 0;

    let minPrice = prices[0]; // Initialize the minimum price to the first day's price
    let maxProfit = 0; // Initialize the maximum profit to zero

    for (let i = 1; i < prices.length; i++) {
        // Update the minimum price if the current price is lower
        minPrice = Math.min(minPrice, prices[i]);

        // Calculate the current profit if we sell at the current price
        let currentProfit = prices[i] - minPrice;

        // Update the maximum profit if the current profit is higher
        maxProfit = Math.max(maxProfit, currentProfit);
    }

    return maxProfit;
}

// Example usage:
const prices = [7, 1, 5, 3, 6, 4];
console.log(maxProfit(prices)); // Output: 5
  • Approach:
  • Initialize minPrice to the first element of the array to track the lowest price seen so far.
  • Initialize maxProfit to zero to track the maximum profit achievable.
  • Iterate through the array starting from the second element.
  • For each price, update minPrice if the current price is lower.
  • Calculate the potential profit by subtracting minPrice from the current price.
  • Update maxProfit if the calculated profit is greater than the current maxProfit.
  • Complexity:
  • Time Complexity: O(n), where n is the number of days (prices). We make a single pass through the array.
  • Space Complexity: O(1), as we use a constant amount of extra space.
Product & growthEasyBooking.comProduct Manager

9. What is your favorite product and why?

The full question

What is your favorite product and why? How would you improve it?

Model answer

Favorite product: My favorite product is Spotify.

Why: Spotify offers an extensive music library, personalized playlists, and a seamless user experience across devices. Its discovery features, like 'Discover Weekly', are particularly impressive.

How to improve:

  1. Enhanced social features: Allow users to create collaborative playlists in real-time, with chat functionality.
  2. Better podcast integration: Improve the podcast discovery algorithm to recommend based on listening habits.
  3. Offline sharing: Enable offline sharing of playlists with friends nearby via Bluetooth or Wi-Fi.

Recommendation: Focus on enhancing social features to increase user engagement and retention.

Prioritization & trade-offs: Prioritize social features due to high potential impact on user engagement. Podcast integration and offline sharing require more resources.

MVP, measurement & rollout: Launch a beta version of the enhanced social features, gather user feedback, and iterate before a full rollout.

Product & growthMediumBooking.comEngineering ManagerCase Study

10. How would you decide when to stop a failing A/B test?

Model answer

Clarify & scope

I’d first clarify what “failing” means: is the variant harming users, showing no benefit, or simply not yet statistically conclusive? I’d check the experiment’s hypothesis, primary metric, minimum detectable effect (MDE), planned duration, and any pre-agreed stopping rules. I would not stop just because a dashboard looks disappointing after a few days; repeated peeking can inflate false positives and lead to the wrong decision.

User segments & pain points

I’d identify who could be affected by the change and whether the impact is concentrated—for example, new versus returning users, mobile versus desktop, or a particular region. A reassuring overall average should not hide a serious impact on an important or vulnerable segment.

Goals & success metrics

The primary metric should reflect the intended user or business outcome, such as completed purchases per eligible visitor. I’d pair it with guardrails such as error rate, cancellations, latency, and support contacts. I’d also verify that assignment, exposure, and event instrumentation are correct before making a decision.

Solutions

I’d distinguish three cases:

  • Stop for harm: If a pre-defined safety guardrail crosses its threshold, pause or roll back promptly, validate the signal, and investigate. Protecting users takes priority over reaching the planned sample size.
  • Stop for futility: If the test has sufficient data and the chance of reaching the MDE is very low, stop rather than spend more time on an unlikely win. I’d use a pre-agreed futility rule or conditional-power analysis.
  • Continue or conclude: If results are inconclusive and the test is still within its planned duration, continue to the planned sample size. If the test meets the planned statistical and practical success criteria, conclude it using the experiment’s pre-specified analysis.

Recommendation: I’d make the call using the experiment plan and user-impact evidence—not a single noisy metric. If we need interim decisions, I’d use a sequential-testing method designed for repeated looks rather than ordinary fixed-horizon significance tests.

Prioritization & trade-offs

I’d weigh user harm and business exposure against the cost of continuing. A brief delay to collect reliable evidence is often worthwhile; continuing a harmful experience merely to reach significance is not.

MVP, measurement & rollout

I’d document the stop reason, data quality checks, affected segments, and decision. For a winner, I’d roll out gradually with monitoring and a rollback trigger; for a loser, I’d record the learning and decide whether to iterate or abandon the idea.

Product & growthMediumBooking.comProduct Manager

11. What challenges did you face when bringing a product to market or launching one?

Model answer

Clarify & scope

I’d describe a launch where the challenge was not simply shipping on time, but aligning the product, market, and operating model around a customer problem. I’d briefly establish the product, my role, the launch scope, and what success meant.

User segments & pain points

For example, in a B2B workflow product, our initial users might be frontline teams who need a faster process, while buyers care about security, reliability, and measurable return. A key challenge is that a product can work well for early adopters but still be hard to discover, adopt, or support at broader scale.

Goals & success metrics

I’d define a North Star tied to customer value—such as teams completing the core workflow successfully—and pair it with guardrails: activation, time to first value, retention, support-contact rate, reliability, and adoption across target segments. I’d distinguish launch readiness from launch success: passing QA is necessary, but it doesn’t prove users are getting value.

Solutions

I’d typically manage three connected challenges:

  • Positioning: Validate the use case and messaging with target customers; avoid promising capabilities the product does not yet support.
  • Readiness: Bring engineering, design, sales, support, legal, and operations together around clear owners, launch criteria, and escalation paths.
  • Adoption: Reduce onboarding friction with documentation, training, and a feedback channel that routes issues to the right team.

Recommendation: I’d use a phased launch: pilot with a representative customer cohort, resolve high-severity issues, then expand when agreed reliability and adoption thresholds are met.

Prioritization & trade-offs

I’d prioritize launch blockers by customer harm, likelihood, and reversibility. I would rather narrow the initial audience than launch broadly with a known trust, compliance, or reliability gap. Conversely, I would not delay for polish that does not materially change customer outcomes.

MVP, measurement & rollout

I’d instrument the funnel from invitation through successful first use and repeat use, review support themes daily during rollout, and make a go/hold/expand decision against pre-agreed thresholds. In an interview, I’d replace this example with my own launch and quantify the result—such as activation, retention, support burden, or revenue—while being candid about what I would do differently.

Product & growthMediumBooking.comProduct Manager

12. Why did you make the decisions you made during the case?

Model answer

Clarify & scope

When explaining case decisions, I’d start by restating the objective and the assumptions I used. That lets the interviewer see that my choices followed from the problem rather than from personal preference. I’d also call out what information I did not have and how I would validate it.

User segments & pain points

I’d identify who experiences the problem most acutely and who influences the decision. If there are multiple segments, I’d explain why I focused on one—for example, greater pain, higher frequency, or a clearer path to value—rather than claiming we can serve everyone equally well.

Goals & success metrics

I’d connect the decision to a customer outcome and a business outcome. I’d use a North Star metric that reflects delivered value, supported by diagnostic measures and guardrails. For instance, improving conversion is not a good decision if it increases cancellations, fraud, or support burden.

Solutions

I’d compare two or three options against the same criteria: expected impact, evidence, time to learn, implementation cost, and reversibility. I’d explain what I chose, what I rejected, and why. A strong rationale acknowledges the best argument against the chosen option.

Recommendation: I’d favor the option that addresses the highest-priority user problem and tests the riskiest assumption with the least irreversible investment. If evidence is weak, I’d recommend a small experiment or pilot rather than presenting a guess as certainty.

Prioritization & trade-offs

I’d make the trade-off explicit: speed versus completeness, short-term metric lift versus durable value, or breadth versus depth. I’d state what I was willing to defer and what guardrail would cause me to reconsider. This shows judgment, not just a list of pros and cons.

MVP, measurement & rollout

Finally, I’d describe the smallest launch that can answer the key question, the cohort and duration, and the success and stop criteria. I’d monitor results by segment, investigate unintended effects, and say what evidence would make me scale, iterate, or reverse the decision. The key is to show a clear chain from objective to evidence, trade-off, decision, and learning.

System designEasyBooking.com

13. Design a simple hotel reservation system that allows users to search for available hotels based on location and dates.

Model answer

1. Requirements & scale

Functional Requirements:

  • Users can search for available hotels based on location and dates.
  • Display hotel details such as name, location, price, and availability.
  • Allow users to filter search results by price, rating, and amenities.

Non-Functional Requirements:

  • The system should be highly available and responsive.
  • It should handle a large number of concurrent searches.
  • Consistent and up-to-date information on hotel availability is crucial.

Estimates:

  • Assume 1 million daily active users, with peak traffic at 10% of users searching simultaneously.
  • Average search request size: 1 KB.
  • Estimated QPS (Queries Per Second): \( \frac{1,000,000 \text{ users} \times 0.1}{24 \times 60 \times 60} \approx 115 \) QPS.
  • Storage: Assume 100,000 hotels, each with 1 KB of metadata, totaling approximately 100 MB.
  • Bandwidth: \( 115 \text{ QPS} \times 1 \text{ KB/request} = 115 \text{ KB/s} \).

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Device]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[Search Service]
        E[Hotel Info Service]
    end

    subgraph Cache
        F[Redis Cache]
    end

    subgraph Datastores
        G[SQL Database]
    end

    A -->|Search Request| B
    B -->|Forward Request| C
    C -->|Route to Service| D
    D -->|Query Cache| F
    F -->|Cache Hit/Miss| D
    D -->|Fetch Details| E
    E -->|Query Database| G
    G -->|Return Data| E
    E -->|Return Results| D
    D -->|Response| C
    C -->|Deliver Response| B
    B -->|Deliver to User| A
Diagram

3. API design

  • GET /search: Retrieve available hotels based on location and dates.
  • Parameters: location, check_in_date, check_out_date, filters (optional).
  • Response: List of hotels with details.
  • GET /hotel/{id}: Fetch detailed information for a specific hotel.
  • Parameters: id (hotel identifier).
  • Response: Hotel details including name, location, price, and amenities.

4. Data model & storage

Datastore Choice:

  • SQL Database: Suitable for structured data and complex queries. Ensures ACID properties for consistency in hotel availability data.

Key Tables:

  • Hotels: hotel_id (PK), name, location, price, rating, amenities.
  • Availability: hotel_id (FK), date, available_rooms.

Partitioning:

  • Shard Key: location for distributing hotel data geographically, reducing latency for location-based searches.

5. Deep dive

The core of the hotel reservation system is the search functionality. When a user initiates a search, the system must efficiently retrieve and filter hotel data based on the specified criteria.

sequenceDiagram
    participant User
    participant CDN
    participant LoadBalancer
    participant SearchService
    participant Cache
    participant HotelInfoService
    participant Database

    User->>CDN: Search Request
    CDN->>LoadBalancer: Forward Request
    LoadBalancer->>SearchService: Route to Service
    SearchService->>Cache: Check Cache
    Cache-->>SearchService: Cache Miss
    SearchService->>HotelInfoService: Fetch Hotel Details
    HotelInfoService->>Database: Query Hotel Data
    Database-->>HotelInfoService: Return Data
    HotelInfoService-->>SearchService: Return Results
    SearchService->>Cache: Update Cache
    SearchService-->>LoadBalancer: Response
    LoadBalancer->>CDN: Deliver Response
    CDN-->>User: Deliver to User
Diagram

6. Scale, bottlenecks & trade-offs

Scaling:

  • Replication: Use database replication to ensure high availability and load distribution.
  • Sharding: Based on location to manage large datasets and improve query performance.

Caching:

  • Implement Redis caching for frequently accessed hotel data to reduce database load and improve response times.

Bottlenecks:

  • Database: Can become a bottleneck under high load; mitigated by sharding and caching.
  • Cache Consistency: Ensure cache invalidation strategies are in place to maintain data accuracy.

Trade-offs:

  • Consistency vs. Availability: Prioritize consistency for hotel availability data, accepting potential trade-offs in availability during peak loads.
  • Push vs. Pull: Use a pull-based approach for user-initiated searches, ensuring up-to-date data retrieval.

By designing the system with these considerations, we ensure a robust, scalable, and efficient hotel reservation system capable of handling user demands effectively.

System designMediumBooking.com

14. Design a system to handle user reviews and ratings for hotels, ensuring data integrity and scalability.

Model answer

1. Requirements & scale

Functional Requirements:

  • Users can submit reviews and ratings for hotels.
  • Users can view reviews and ratings for a specific hotel.
  • Ensure data integrity, preventing duplicate or fraudulent reviews.
  • Support search and filtering of reviews based on various criteria (e.g., date, rating).

Non-Functional Requirements:

  • High availability and low latency for read operations.
  • Scalability to handle millions of reviews and concurrent users.
  • Strong consistency for review submissions.
  • Fault tolerance and data durability.

Estimates:

  • Assume 10 million hotels, with each hotel having an average of 1,000 reviews.
  • Total reviews = 10 billion.
  • Average review size = 1 KB.
  • Total storage = 10 billion * 1 KB = 10 TB.
  • Assume peak QPS (queries per second) for reads = 100,000 and writes = 10,000.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Device]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[Review Service]
        E[Rating Service]
    end

    subgraph Cache
        F[Redis Cache]
    end

    subgraph Datastores
        G[SQL Database]
        H[NoSQL Database]
    end

    subgraph Message Queue
        I[Kafka Queue]
    end

    subgraph Workers
        J[Fraud Detection Worker]
    end

    A -->|Submit/View Review| B
    B --> C
    C --> D
    C --> E
    D -->|Read/Write| F
    E -->|Read/Write| F
    F -->|Cache Miss| G
    F -->|Cache Miss| H
    D -->|New Review| I
    I --> J
    J -->|Validate| G
Diagram

3. API design

  • POST /reviews: Submit a new review for a hotel.
  • GET /reviews/{hotelId}: Retrieve reviews for a specific hotel.
  • GET /reviews/{hotelId}/filter: Retrieve filtered reviews based on criteria.
  • POST /ratings: Submit a rating for a hotel.
  • GET /ratings/{hotelId}: Retrieve the average rating for a hotel.

4. Data model & storage

Chosen Datastores:

  • SQL Database: For strong consistency and transactional support for reviews and ratings.
  • NoSQL Database: For scalable read operations and storing denormalized review data.
  • Redis Cache: To cache frequently accessed reviews and ratings.

Key Tables:

  • Reviews: (id, hotel_id, user_id, review_text, timestamp)
  • Ratings: (hotel_id, user_id, rating, timestamp)

Partition Key:

  • hotel_id: Used for partitioning in both SQL and NoSQL databases to distribute load evenly.

5. Deep dive

The core challenge is ensuring data integrity and scalability while handling high QPS for reads and writes. The system uses a combination of SQL and NoSQL databases to balance consistency and scalability.

sequenceDiagram
    participant U as User
    participant S as Review Service
    participant C as Cache
    participant DB as SQL Database
    participant MQ as Message Queue
    participant W as Fraud Detection Worker

    U->>S: Submit Review
    S->>C: Check Cache
    alt Cache Miss
        C->>DB: Write Review
        DB-->>S: Acknowledge
        S->>MQ: Publish to Queue
        MQ-->>W: Notify Worker
        W->>DB: Validate Review
    else Cache Hit
        C-->>S: Return Cached Data
    end
    S-->>U: Acknowledge Submission
Diagram

6. Scale, bottlenecks & trade-offs

Replication and Sharding:

  • SQL Database is sharded by hotel_id to distribute write load.
  • NoSQL Database uses replication to ensure high availability and fault tolerance.

Caching:

  • Redis is used to cache frequently accessed reviews and ratings to reduce database load and improve read latency.

Single Points of Failure:

  • Load balancers and databases are set up in a redundant configuration to avoid single points of failure.

Trade-offs:

  • Consistency vs. Availability: The system prioritizes consistency for writes to ensure data integrity, which may slightly impact availability during network partitions.
  • Push vs. Pull: Fraud detection uses a pull model with workers consuming from a message queue, allowing for asynchronous processing and scalability.
  • SQL vs. NoSQL: SQL is used for transactional integrity, while NoSQL provides scalable read operations, balancing the need for consistency and performance.
System designMediumBooking.comSoftware EngineerOnsite

15. Design a logging/telemetry system for a large application platform.

The full question

Design a logging/telemetry system for a large application platform.

Requirements:

  • Many services send log or metric events to the system
  • Event submission from producers can be asynchronous
  • Users must be able to read/query the data in real time for debugging, monitoring, or dashboards

Discuss:

  • APIs and data model
  • High-level architecture for ingestion, storage, and querying
  • How to handle high write throughput
  • How to make recently ingested data available for real-time reads
  • Reliability, fault tolerance, and backpressure
  • Partitioning, indexing, retention, and scaling trade-offs

Model answer

1. Requirements & scale

Functional Requirements:

  • Support asynchronous event submission from multiple services.
  • Enable real-time querying and dashboarding of logs and metrics.
  • Provide reliable and fault-tolerant data ingestion and storage.

Non-Functional Requirements:

  • High availability and low latency for both ingestion and querying.
  • Scalability to handle high write throughput and large volumes of data.
  • Data retention policies to manage storage costs.

Estimates:

  • Assume 1000 services, each generating 100 events per second: 100,000 events per second (QPS).
  • Each event is approximately 1 KB, leading to 100 MB/s of data ingestion.
  • For a 30-day retention period, storage needs are approximately 259 TB (100 MB/s 60 60 24 30).

2. High-level architecture

flowchart TD
    subgraph Client
        A[Service Producers]
    end
    subgraph Edge/CDN
        B[Kafka Brokers]
    end
    subgraph Load Balancer
        C[Load Balancer]
    end
    subgraph API / Services
        D[Ingestion Service]
        E[Query Service]
    end
    subgraph Cache
        F[Redis Cache]
    end
    subgraph Datastores
        G[Time-Series DB]
        H[Blob Storage]
    end
    subgraph Message Queue
        I[Kafka Topics]
    end
    subgraph Workers
        J[Stream Processors]
    end

    A -->|Log/Metric Events| B
    B -->|Distribute Events| I
    I -->|Consume Events| D
    D -->|Store Processed Data| G
    D -->|Store Raw Data| H
    E -->|Query Data| G
    E -->|Cache Results| F
    F -->|Serve Cached Queries| E
    J -->|Process Streams| D
Diagram

3. API design

  • POST /events: Ingest log or metric events from producers.
  • GET /query: Retrieve processed data for real-time analysis.
  • GET /dashboard: Fetch data for dashboard visualizations.

4. Data model & storage

Datastores:

  • Time-Series Database (e.g., InfluxDB, TimescaleDB): Optimized for high write throughput and time-based queries. Suitable for storing processed metrics and logs.
  • Blob Storage (e.g., Amazon S3): Used for storing raw log data for long-term retention and batch processing.

Data Model:

  • Events Table:
  • event_id (UUID)
  • timestamp (TIMESTAMP)
  • service_id (STRING)
  • event_type (STRING)
  • payload (JSONB)

Partitioning:

  • Partition by timestamp for time-based queries.
  • Shard by service_id to distribute load evenly.

5. Deep dive

The crux of this system is handling high write throughput while ensuring real-time availability for queries. Kafka serves as the backbone for event ingestion, offering durability and scalability. Events are published to Kafka topics, partitioned by service_id, which allows for parallel processing and efficient load distribution.

sequenceDiagram
    participant A as Service Producer
    participant B as Kafka Broker
    participant C as Ingestion Service
    participant D as Time-Series DB
    participant E as Query Service

    A->>B: Publish Event
    B->>C: Forward Event
    C->>D: Store Processed Event
    E->>D: Query for Real-Time Data
    D->>E: Return Query Results
Diagram

6. Scale, bottlenecks & trade-offs

Replication and Sharding:

  • Kafka topics are replicated across multiple brokers to ensure data durability and availability.
  • Time-Series DB is sharded by service_id to handle high write throughput and distribute load.

Caching:

  • Redis is used to cache frequent queries, reducing load on the database and improving response times.

Backpressure and Fault Tolerance:

  • Kafka handles backpressure by buffering events in topics, allowing producers to continue sending data even if downstream systems are slow.
  • Stream processors ensure at-least-once processing semantics to handle failures gracefully.

Trade-offs:

  • Consistency vs. Availability: The system prioritizes availability and eventual consistency, suitable for real-time analytics where slight delays in data propagation are acceptable.
  • Retention vs. Cost: Data retention policies balance storage costs and the need for historical data, with raw data stored in cost-effective blob storage.

This design leverages a combination of stream processing, time-series databases, and caching to meet the requirements of a high-throughput, real-time logging and telemetry system.

System designMediumBooking.com

16. How would you design a notification system for sending booking confirmations and reminders to users?

Model answer

1. Requirements & scale

Functional Requirements:

  • Send booking confirmation notifications to users immediately after a booking is made.
  • Send reminder notifications to users a specified time before their booking.
  • Support multiple notification channels: email, SMS, and push notifications.
  • Allow users to manage their notification preferences.

Non-Functional Requirements:

  • High availability and reliability to ensure notifications are sent promptly.
  • Scalability to handle peak loads, such as during holiday seasons.
  • Low latency to ensure timely delivery of notifications.
  • Security to protect user information and preferences.

Estimates:

  • Assume 10 million bookings per day, with each booking generating at least two notifications (confirmation and reminder).
  • Peak QPS (queries per second) for sending notifications: \( \frac{10,000,000 \times 2}{86,400} \approx 231 \) QPS.
  • Storage for user preferences: Assume 100 million users, with each preference record being 1 KB, resulting in 100 GB of storage.
  • Bandwidth: Assume each notification is 1 KB, resulting in 20 GB of data transfer per day.

2. High-level architecture

flowchart TD
  subgraph Client
    A[User Devices]
  end

  subgraph Edge/CDN
    B[CDN]
  end

  subgraph Load Balancer
    C[Load Balancer]
  end

  subgraph API / Services
    D[Notification API]
  end

  subgraph Cache
    E[Redis Cache]
  end

  subgraph Datastores
    F[User Preferences DB]
    G[Notification Logs DB]
  end

  subgraph Message Queue
    H[Message Queue]
  end

  subgraph Workers
    I[Notification Workers]
  end

  A -->|Request| B -->|Forward| C -->|Route| D
  D -->|Read/Write| E
  D -->|Read/Write| F
  D -->|Log| G
  D -->|Enqueue| H
  H -->|Process| I
  I -->|Send Notifications| A
Diagram

3. API design

  • POST /notifications/send: Trigger sending of a notification.
  • GET /notifications/preferences: Retrieve user notification preferences.
  • PUT /notifications/preferences: Update user notification preferences.
  • POST /notifications/reminder: Schedule a reminder notification.

4. Data model & storage

Datastores:

  • User Preferences DB (SQL): Used for storing user notification preferences. SQL is chosen for its ACID properties and complex querying capabilities.
  • Table: UserPreferences
  • user_id (Primary Key)
  • email_enabled (Boolean)
  • sms_enabled (Boolean)
  • push_enabled (Boolean)
  • reminder_time (Integer)
  • Notification Logs DB (NoSQL): Used for logging sent notifications. NoSQL is chosen for its scalability and ability to handle large volumes of writes.
  • Table: NotificationLogs
  • notification_id (Primary Key)
  • user_id
  • type (e.g., confirmation, reminder)
  • status (e.g., sent, failed)
  • timestamp
  • Cache (Redis): Used for caching user preferences to reduce database load and improve response times.

5. Deep dive

The core of the notification system is the process of sending notifications efficiently and reliably. This involves queuing notifications and processing them asynchronously.

sequenceDiagram
  participant API as Notification API
  participant MQ as Message Queue
  participant Worker as Notification Worker
  participant User as User Device

  API->>MQ: Enqueue Notification Request
  MQ->>Worker: Deliver Notification Task
  Worker->>User: Send Notification
  Worker->>API: Log Notification Status
Diagram
  1. Enqueue Notification: When a booking is made, the Notification API enqueues a notification request in the Message Queue.
  2. Process Notification: Notification Workers consume messages from the queue, process them, and send notifications to the respective channels (email, SMS, push).
  3. Send Notification: The worker sends the notification to the user's device.
  4. Log Status: After sending, the worker logs the notification status in the Notification Logs DB for auditing and troubleshooting.

6. Scale, bottlenecks & trade-offs

  • Replication and Sharding: Databases should be replicated and sharded to handle high read and write loads. User Preferences DB can be sharded by user_id, while Notification Logs DB can be sharded by notification_id.
  • Caching: Redis is used to cache user preferences, reducing database load and improving response times. This introduces a trade-off between consistency and performance, as cached data might be slightly stale.
  • Single Points of Failure: The system should be designed to avoid single points of failure by using redundant components and failover strategies for critical services like the Message Queue and Notification Workers.
  • Trade-offs: The system prioritizes availability and partition tolerance over consistency (AP in CAP theorem) due to the eventual consistency model of NoSQL databases and the use of caching.
  • Push vs. Pull: Notifications are pushed to users to ensure timely delivery, which is crucial for confirmations and reminders.

By following this design, the notification system can efficiently handle the scale and complexity of sending booking confirmations and reminders, ensuring a reliable and user-friendly experience.

TechnicalEasyBooking.com

17. What is idempotency in web services, and why is it important?

Model answer

Idempotency in Web Services

  1. Definition: - Idempotency is a property of certain operations in web services where performing the same operation multiple times has the same effect as performing it once. This means that no matter how many times the operation is executed, the result remains unchanged after the initial application.
  2. Importance: - Reliability: Idempotency ensures that operations can be retried safely without causing unintended side effects. This is crucial in distributed systems where network failures or timeouts might lead to duplicate requests. - Consistency: It helps maintain data consistency by preventing duplicate updates or actions, which is especially important in systems that handle financial transactions or critical data updates. - User Experience: Enhances user experience by preventing errors or inconsistencies that might arise from repeated actions, such as multiple charges for a single purchase.
  3. Use Cases: - HTTP Methods: In RESTful services, certain HTTP methods are idempotent by definition, such as GET, PUT, and DELETE. For example, a PUT request to update a resource should result in the same state of the resource, regardless of how many times it is executed. - Payment Processing: Ensures that a payment is processed only once even if the request is sent multiple times due to network retries or user actions.
  4. Implementation Considerations: - Idempotency Keys: Use unique identifiers for requests to track and ensure that repeated requests do not result in duplicate operations. - Database Constraints: Implement constraints at the database level to prevent duplicate entries or updates.
  5. Challenges: - State Management: Maintaining the state to track idempotent operations can be complex, especially in distributed systems. - Performance Overhead: Additional checks and state management can introduce performance overhead.

By ensuring operations are idempotent, web services can achieve higher reliability and consistency, improving overall system robustness and user satisfaction.

TechnicalMediumBooking.comSoftware EngineerTechnical Screen

18. What is the difference between heap and stack memory?

The full question

What is the difference between heap and stack memory? Compare Protobuf and JSON for data serialization. Compare gRPC and traditional RPC mechanisms. When is event streaming (e.g., Kafka) appropriate? When should you use a table join in SQL? What does SQL stand for? What does CI/CD stand for?

Model answer

Heap vs. Stack Memory

  • Heap Memory:
  • Used for dynamic memory allocation.
  • Memory is allocated and freed in an arbitrary order.
  • Managed by the programmer or garbage collector.
  • Typically larger than stack memory.
  • Slower access compared to stack due to its unordered nature.
  • Stack Memory:
  • Used for static memory allocation.
  • Follows Last In First Out (LIFO) order.
  • Automatically managed by the compiler.
  • Faster access due to its ordered nature.
  • Limited in size compared to heap memory.

Protobuf vs. JSON for Data Serialization

  • Protobuf (Protocol Buffers):
  • Binary format, more compact and efficient.
  • Requires schema definition (.proto files).
  • Faster serialization/deserialization.
  • Strongly typed, ensuring data consistency.
  • JSON:
  • Text-based format, human-readable.
  • No need for a predefined schema.
  • Slower serialization/deserialization due to text parsing.
  • More flexible but less efficient in terms of size and speed.

gRPC vs. Traditional RPC Mechanisms

  • gRPC:
  • Uses HTTP/2 for transport, enabling multiplexing and bidirectional streaming.
  • Supports multiple languages through Protocol Buffers.
  • Provides built-in support for authentication, load balancing, and more.
  • More efficient for microservices architectures due to its binary format.
  • Traditional RPC:
  • Often uses HTTP/1.1 or custom protocols.
  • May not support streaming or multiplexing efficiently.
  • Typically less efficient for modern microservices due to text-based formats.
  • Requires more manual setup for features like authentication and load balancing.

When to Use Event Streaming (e.g., Kafka)

  • Appropriate Use Cases:
  • Real-time data processing and analytics.
  • Event-driven architectures where decoupling of services is required.
  • High-throughput data ingestion pipelines.
  • Scenarios requiring reliable, scalable, and fault-tolerant data movement.

When to Use a Table Join in SQL

  • Appropriate Use Cases:
  • Combining data from multiple tables based on a related column.
  • Situations where data normalization is used to reduce redundancy.
  • Queries that require data from different entities to be presented together.

SQL and CI/CD Definitions

  • SQL:
  • Stands for Structured Query Language.
  • Used for managing and manipulating relational databases.
  • CI/CD:
  • Stands for Continuous Integration and Continuous Deployment.
  • Practices that automate the integration and deployment of code changes, ensuring faster and more reliable software delivery.
TechnicalMediumBooking.comEngineering Manager

19. How do you handle objections or pushback from your team when selecting a technology?

Model answer

I treat technology selection as a decision the team should understand and be able to execute—not a contest in which I need to win an argument. I first clarify the problem and constraints, then distinguish objections based on evidence from concerns about familiarity, workload, or risk. Each deserves a respectful response, but not necessarily the same decision.

  1. Make the decision explicit. I name the decision owner, deadline, reversibility, and success criteria. For example, a storage choice might be judged on p99 latency, availability, operational burden, cost at projected scale, and data consistency—not simply developer preference.
  2. Listen for the underlying concern. I ask what failure mode the person is worried about and what evidence would change their view. I invite dissenting engineers to write down assumptions and risks before the group converges, reducing the influence of hierarchy.
  3. Compare options against shared criteria. We include build-versus-buy and the cost of staying with the current system. I make trade-offs visible: ecosystem maturity versus lock-in, consistency versus availability, short-term migration cost versus long-term operating complexity.
  4. Use a time-boxed proof when uncertainty is material. A small prototype or production-like benchmark can test the riskiest assumptions. I define the workload, baseline, and pass/fail thresholds in advance; otherwise, a proof of concept can become an endless debate.
  5. Make and communicate the call. If the decision is reversible, I favor a bounded trial with an exit path. If it is expensive to reverse, I raise the evidence bar and involve security, SRE, and architecture stakeholders early. I document the decision and the conditions that would trigger reconsideration.
  6. Commit together after deciding. I expect the team to support the chosen direction professionally, while keeping a channel open for new evidence. I do not equate disagreement with lack of alignment.
flowchart TD
    A[Clarify problem and constraints] --> B[Collect concerns and evidence]
    B --> C[Compare options against agreed criteria]
    C --> D{Uncertainty or high reversal cost?}
    D -->|Yes| E[Run time-boxed test or review]
    D -->|No| F[Make decision]
    E --> F
    F --> G[Document trade-offs and owner]
    G --> H[Measure outcomes and revisit on triggers]
Diagram

I watch the chosen technology’s reliability, p95/p99 latency, cost per transaction, deployment frequency, incident burden, and developer productivity against the baseline. A common pitfall is choosing on benchmark performance alone while ignoring migration risk, on-call load, skills, or exit cost.

TechnicalMediumBooking.comEngineering ManagerStakeholder discussion

20. How do you manage projects when trade-offs or delays arise?

Model answer

How I manage trade-offs and delays

  1. Reconfirm the outcome. I clarify which customer or business outcome the project must deliver, the date constraints, and what is truly fixed. I distinguish a committed deadline from a preferred one.
  2. Make the impact visible. I work with the tech lead and product partner to identify the critical path, estimate the delay or scope change, and make dependencies and uncertainty explicit. I use a small set of milestones and leading indicators rather than a false-precision percent-complete report.
  3. Develop options. I usually frame choices as: deliver the full scope later; meet the date with a smaller, coherent MVP; or add capacity or reduce risk where that is genuinely effective. I document customer impact, quality and operational risks, cost, and reversibility for each option.
  4. Decide with the right owners. I bring a recommendation—not just a problem—to the decision-makers. I involve the team in estimates and technical choices, while making clear who owns the final product or business trade-off. If the team disagrees, I surface evidence and decision criteria rather than letting the disagreement stall execution.
  5. Replan and communicate. Once we decide, I reset milestones, owners, and dependencies; tell affected stakeholders early; and set a check-in to revisit assumptions. I protect testing, security, and reliability work rather than quietly spending down quality.
flowchart TD
    A[Signal: delay or trade-off] --> B[Reconfirm outcome and constraints]
    B --> C[Assess critical path, impact, and risk]
    C --> D[Compare scope, date, and capacity options]
    D --> E[Agree decision and owner]
    E --> F[Replan, communicate, and monitor]
    F --> G{Assumptions still hold?}
    G -- Yes --> F
    G -- No --> C
Diagram

Example: If a dependency slips, I might recommend launching the core workflow to a limited cohort on the original date, while deferring a low-usage reporting feature. I would only do that if the cohort can be supported safely and the deferred work has a named owner and date.

Metrics: milestone confidence, critical-path variance, scope delivered against the agreed outcome, escaped defects, and customer or operational impact. Avoid treating velocity as a commitment or using overtime as the default recovery plan.

What interviewers listen for: Early escalation, transparent options, customer-centered judgment, protection of quality, and clear accountability after a decision.

Practice these out loud, don't memorise them

Reading an answer is not the same as being able to give one under pressure. ChannelPulse plays the interviewer, asks the follow-ups, and scores each answer with feedback and a model answer so you can hear the gap between what you said and what lands.

Get ChannelPulse Browse all questions