5–8 years · Senior — Node.js · Express · MongoDB · React · REST APIs · Authentication
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 logs indicate a specific route is failing. What would you do next to isolate the issue?
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 tokens are valid but still causing logouts. What else might affect session continuity?
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.
You suspect database latency is the issue. What strategies do you employ to investigate further?
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.
How do you ensure that the system is resilient to similar failures in the future?
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.
One of the data sources becomes temporarily unavailable. How do you handle this within your application?
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 indexes are in place, but queries are still slow. What additional factors might be influencing performance?
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.