Interview practice

Full Stack Developer (MERN)

5–8 years · Senior — Node.js · Express · MongoDB · React · REST APIs · Authentication

0–2 years 2–5 years 5–8 years 8+ years
technical Error Handling 1 of 6
Your Express.js application is logging errors intermittently, but you cannot replicate the issue in development. How do you approach diagnosing this problem?
What a strong answer covers

Enables detailed logging for error responses to capture stack traces and request details; reviews middleware order to ensure error handling is correctly configured; checks for unhandled promise rejections or callback errors; examines server configuration for any atypical setups; considers adding a monitoring tool for real-time insights.

The follow-up you would get

The logs indicate a specific route is failing. What would you do next to isolate the issue?

Could you have answered that?
technical Authentication 2 of 6
You implement JWT authentication, but after a week of use, users are experiencing unexpected logouts. What steps do you take to diagnose the issue?
What a strong answer covers

Checks token expiration times and refresh token implementation; reviews server logs for errors during verification; examines client-side storage and token retrieval logic; considers issues with browser storage or cross-origin requests; verifies that tokens are being sent with every request.

The follow-up you would get

The tokens are valid but still causing logouts. What else might affect session continuity?

Could you have answered that?
technical Performance Optimization 3 of 6
A Node.js API endpoint that previously handled 100 requests per second is now dropping requests under load. What steps do you take to diagnose and resolve the issue?
What a strong answer covers

Monitors CPU and memory usage to identify bottlenecks; checks for synchronous code that could be blocking the event loop; reviews database queries for performance issues; implements caching strategies to reduce load; considers scaling the service horizontally if required.

The follow-up you would get

You suspect database latency is the issue. What strategies do you employ to investigate further?

Could you have answered that?
scenario Error Handling 4 of 6
An error occurs in production that causes the entire application to crash, and you receive no alerts. What steps do you take to address the situation?
What a strong answer covers

Access production logs to identify the error stack trace; determine the root cause of the crash; implement a temporary fix to restore service; review error handling mechanisms in code to prevent future crashes; update monitoring tools to capture similar errors.

The follow-up you would get

How do you ensure that the system is resilient to similar failures in the future?

Could you have answered that?
scenario Data Flow 5 of 6
You are implementing a feature that requires data to be dynamically fetched from multiple sources, but the response times are causing delays. What strategies do you employ to mitigate this?
What a strong answer covers

Identify and prioritise which data sources are critical; implement caching for frequently accessed data; explore parallel fetching of data sources; set reasonable timeouts and fallback mechanisms; adjust response handling to maintain user experience.

The follow-up you would get

One of the data sources becomes temporarily unavailable. How do you handle this within your application?

Could you have answered that?
technical Schema Design 6 of 6
You notice that a MongoDB collection has grown significantly, leading to degraded performance on read operations. What steps do you take to optimise the schema?
What a strong answer covers

Analyzes the current schema for normalisation versus denormalisation trade-offs; checks indexing strategies to ensure key fields are indexed; considers the use of aggregation pipelines for complex queries; evaluates sharding if the dataset is extremely large; reviews data access patterns to inform schema adjustments.

The follow-up you would get

The indexes are in place, but queries are still slow. What additional factors might be influencing 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.