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
technical Concurrency 1 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?
technical Background jobs 2 of 6
A scheduled task using Celery runs every hour but is frequently timing out. What steps do you take to troubleshoot and resolve the issue?
What a strong answer covers

Examines task logs for error messages or performance bottlenecks; reviews task configuration for time limits and retries; checks resource usage to identify CPU or memory constraints; considers breaking the task into smaller units; evaluates the message broker for performance issues.

The follow-up you would get

What are the implications of using different message brokers?

Could you have answered that?
ownership A failure during a migration 3 of 6
Describe a migration you led that encountered significant issues, and what you learned from it.
What a strong answer covers

Identifies specific migration details and the context; explains the unforeseen challenges faced during the process; describes the resolution steps taken and their impact on timelines; reflects on what could have been done differently to mitigate risks; avoids blaming external factors.

The follow-up you would get

What pre-migration checks would you implement next time?

Could you have answered that?
scenario Data integrity 4 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 Testing 5 of 6
A new feature has been developed but only unit tests exist, and they are insufficient due to complex interactions. How do you approach testing in this case?
What a strong answer covers

Identifies integration and end-to-end tests required for complex interactions; uses mocking to isolate components during tests; implements test cases that cover edge cases and user scenarios; evaluates test coverage tools to identify gaps; incorporates Continuous Integration to run tests automatically.

The follow-up you would get

What role does test-driven development play in this process?

Could you have answered that?
scenario Error handling 6 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?
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.