Google logo

Google Backend Engineer System Design Questions

48 practice questions for Google Backend Engineer interviews

Google backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for Google.

system design Senior messaging #1

1. [OA] Messaging Queue — building a scalable message handling system for Google Chat

Google Chat requires a reliable messaging system to handle messages between users effectively. A simple message queue can be implemented to ensure that messages are processed in the order they are received.
Problem Statement: Design a MessageQueue class that allows enqueuing and dequeuing messages, ensuring that all messages are processed in FIFO order.
Class Signature: class MessageQueue:
- def __init__(self): — initializes the message queue.
- def enqueue(self, message: str) -> None: — adds a message to the queue.
- def dequeue(self) -> str: — removes and returns the oldest message from the queue. If the queue is empty, raises an exception.
Example 1:
Input: msg_queue = MessageQueue(); msg_queue.enqueue('Hello'); msg_queue.enqueue('World'); msg_queue.dequeue()
Output: 'Hello'
Constraints:
- The message length is at most 10^5 characters.
system design Senior api design #2

2. [OA] RateLimiter — controlling API request rates for Google Cloud services

As Google Cloud offers APIs to developers, it's essential to manage the rate of requests to prevent abuse. A rate limiter needs to enforce a maximum number of requests per time frame.
Problem Statement: Design a RateLimiter class which limits the number of API requests per second.
Class Signature: class RateLimiter:
- def __init__(self, requests_per_second: int): — initializes the rate limiter with the specified maximum requests per second.
- def allow_request(self, user_id: str) -> bool: — returns True if the request is allowed according to the rate limit, otherwise False.
- def reset(self, user_id: str) -> None: — resets the request count for a specific user.
Example 1:
Input: RateLimiter(2); rate_limiter.allow_request('user1')
Output: True
Input: rate_limiter.allow_request('user1')
Output: True
Input: rate_limiter.allow_request('user1')
Output: False
Input: rate_limiter.reset('user1')
Constraints:
- 1 <= requests_per_second <= 100
- A user can make at least one request.

Related Google Backend Engineer interview prep

Start practicing Google questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free