Interview practice

Python Backend Developer

5–8 years · Senior — Python · Django / Flask / FastAPI · REST APIs · SQL · Celery · Testing

0–2 years 2–5 years 5–8 years 8+ years
scenario Data consistency 1 of 6
You've deployed a new feature that allows users to update their profiles, but now some users report that their changes are not appearing. What steps do you take in the first fifteen minutes?
What a strong answer covers

Checks the API response for proper success messages; verifies database transactions for consistency; inspects the caching layer for stale data; reviews logs for errors or exceptions during updates; identifies if there’s a race condition affecting the updates.

The follow-up you would get

You find out that the updates are being cached incorrectly. What changes do you make to ensure data consistency?

Could you have answered that?
scenario System design 2 of 6
Your team needs to add a new service to handle user notifications, but the project deadline is tight, and there are conflicting requirements from other teams. How do you approach this situation?
What a strong answer covers

Gathers essential requirements from stakeholders to prioritise functionalities; evaluates existing services for potential reuse to save time; designs a minimal viable product (MVP) focusing on core functionality; discusses trade-offs with the team regarding scalability and future enhancements; sets a timeline for iterative improvements post-launch.

The follow-up you would get

Once the service is deployed, you learn it isn't scaling as expected. What steps do you take to address this?

Could you have answered that?
ownership An incident you handled 3 of 6
Describe an incident where a production issue arose in your service. What was your approach to resolving it?
What a strong answer covers

Identifies the specific incident and its impact; outlines the immediate steps taken to diagnose the issue; details the resolution process and communication with stakeholders; mentions any long-term changes implemented to prevent recurrence; reflects on lessons learned from the incident.

The follow-up you would get

What would you do differently next time?

Could you have answered that?
technical Async Programming 4 of 6
A Celery task that used to complete in 10 seconds is now timing out after 60 seconds under load. What steps do you take to diagnose the issue?
What a strong answer covers

Checks Celery worker logs for errors or long-running tasks; looks at the task queue length and identifies if tasks are stuck; profiles the task to find bottlenecks; considers splitting the task into smaller, more manageable chunks; evaluates worker concurrency settings.

The follow-up you would get

What factors could lead to tasks being stuck in the queue?

Could you have answered that?
scenario API performance 5 of 6
A new feature in your REST API is causing slow responses during peak usage times. What is your immediate action plan?
What a strong answer covers

Profiles the API endpoint to identify slow components; checks database queries for efficiency and index usage; implements caching for frequent requests; considers rate limiting to manage load; monitors system metrics for further insights.

The follow-up you would get

After optimisations, the API still underperforms. What do you explore next?

Could you have answered that?
technical Testing 6 of 6
You have a suite of automated tests, but the execution time has doubled to over 30 minutes. What actions do you take to diagnose and resolve this issue?
What a strong answer covers

Identifies slow tests by profiling test execution; considers parallelising test execution with pytest-xdist; checks for unnecessary I/O operations during tests; removes redundant tests or merges similar ones; evaluates the use of mocking to reduce dependencies on external services.

The follow-up you would get

How do you determine which tests should be run in parallel versus sequentially?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.