Interview practice

Python Backend Developer

2–5 years · Mid — Python · Django / Flask / FastAPI · REST APIs · SQL · Celery · Testing

0–2 years 2–5 years 5–8 years 8+ years
scenario Error handling 1 of 6
A third-party service you rely on for user authentication is temporarily unavailable, causing login failures for users. What immediate actions do you take?
What a strong answer covers

Implements a fallback mechanism for local authentication; logs the failure rate for analysis; notifies users of the issue through a status page; escalates to appropriate teams for third-party resolution; assesses impact on user experience.

The follow-up you would get

What long-term strategies would you implement to mitigate the impact of similar outages in the future?

Could you have answered that?
ownership A design decision that backfired 2 of 6
Can you discuss a design choice you made for a service that didn’t work out as expected?
What a strong answer covers

Details the specific design choice and the problem it aimed to solve; explains the reasons for the design at the time; describes how the issue was discovered and its effect on the service; outlines the adjustments made post-issue; avoids attributing blame to team dynamics.

The follow-up you would get

What alternative designs did you consider at the time?

Could you have answered that?
technical Concurrency 3 of 6
You have a Python application using threads for concurrent tasks, but you notice performance bottlenecks. What factors would lead you to consider using async instead?
What a strong answer covers

Identifies I/O-bound tasks as the source of bottlenecks; evaluates the Global Interpreter Lock (GIL) impact on CPU-bound tasks; considers the overhead of thread management; assesses whether using async would simplify control flow; mentions potential libraries like asyncio or aiohttp for handling async tasks.

The follow-up you would get

What specific scenarios still benefit from threads over async?

Could you have answered that?
scenario Performance optimisation 4 of 6
You’re notified that a new feature you implemented has led to increased response times for a key API. What steps do you take to diagnose the performance issue?
What a strong answer covers

Profiles the API to identify bottlenecks; checks database query execution plans for inefficiencies; evaluates caching mechanisms for improvements; considers load testing results to understand usage patterns; reviews recent code changes impacting performance.

The follow-up you would get

After identifying the bottleneck, what prioritisation criteria do you use to decide on the fixes?

Could you have answered that?
scenario Data integrity 5 of 6
A recent deployment has introduced a regression where some users are unable to access their data. How do you approach identifying the root cause?
What a strong answer covers

Checks recent code changes related to data retrieval; examines user permissions and query filters; reviews error logs for access patterns; verifies database migrations for completeness; considers user session states affecting access.

The follow-up you would get

You discover the regression relates to a change in the data model. How do you ensure this doesn’t happen again in future deployments?

Could you have answered that?
technical Database access patterns 6 of 6
A database query intended to retrieve user information is consistently running slower than expected. The query is designed to return up to 1000 records. What strategies do you apply to improve performance?
What a strong answer covers

Analyses the execution plan for expensive operations; checks for missing indexes on frequently queried fields; evaluates if the selected columns are necessary or if projections can reduce the load; considers pagination to limit returned records; reviews the database schema for normalization issues.

The follow-up you would get

What impact does denormalisation have on query performance?

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.