Interview practice

Java Backend Developer

5–8 years · Senior — Java · Spring Boot · REST APIs · JPA / Hibernate · SQL · Microservices

0–2 years 2–5 years 5–8 years 8+ years
technical API Design 1 of 6
Your REST API has grown, and consumers are reporting that its performance has degraded. How do you determine where the issues lie, and what optimisations do you propose?
What a strong answer covers

Reviews API response times and identifies slow endpoints using metrics; checks for heavy payloads and considers pagination or reducing data size; assesses the complexity of business logic in controllers; investigates caching strategies for frequent requests; suggests implementing rate limiting and throttling to manage load.

The follow-up you would get

If pagination is implemented but performance issues persist, what further steps can be taken?

Could you have answered that?
scenario Service Communication 2 of 6
A critical microservice is down, but your application still needs to process requests. How do you handle the situation and ensure minimal impact on users?
What a strong answer covers

Checks service status and health endpoints; implements a circuit breaker pattern to avoid cascading failures; queues requests for later processing if possible; communicates incidents to stakeholders and sets expectations; evaluates fallback mechanisms or alternative services.

The follow-up you would get

How would you ensure that the circuit breaker doesn’t lead to stale data being served?

Could you have answered that?
scenario Data Migration 3 of 6
You need to migrate a large dataset to a new database schema with minimal downtime. What steps do you take to ensure a smooth migration?
What a strong answer covers

Plans a phased migration approach to reduce load; uses shadow reads to compare old and new datasets; implements change data capture for ongoing changes during migration; sets up rollback procedures in case of issues; ensures thorough testing of migration scripts.

The follow-up you would get

If the migration process encounters unexpected performance degradation, how would you adjust your approach?

Could you have answered that?
ownership A migration you led 4 of 6
Can you talk about a migration to a new technology or framework you led and the challenges you faced?
What a strong answer covers

Describes the technology or framework being migrated from and to; discusses specific challenges encountered such as compatibility issues or team resistance; details the strategy used for the migration and any rollback plans; explains the impact on the business and users; shares outcomes and follow-up actions.

The follow-up you would get

How did you measure the success of the migration?

Could you have answered that?
technical Microservices 5 of 6
A microservice you manage is scaling poorly under load, leading to increased response times. How do you approach diagnosing the issue, and what steps do you implement first?
What a strong answer covers

Monitors service metrics like CPU, memory, and response times; checks for bottlenecks in API calls and service dependencies; verifies whether the service is stateless; assesses whether proper load balancing and caching are implemented; prioritises optimising database access patterns.

The follow-up you would get

If you find that the database is a bottleneck, what strategies can you employ to alleviate the pressure?

Could you have answered that?
scenario API Versioning 6 of 6
You need to deprecate an old version of your REST API but users are still on it. How do you manage the deprecation process while maintaining service quality?
What a strong answer covers

Communicates deprecation timeline to users through documentation and headers; implements a graceful transition period with both versions running; monitors usage of the old API; provides support and migration guides for users; sets a hard deadline for the removal of the old version.

The follow-up you would get

If users refuse to migrate, how do you balance support for the old version with the need to advance the codebase?

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.