Service performance tuning
21 questions in 5 subtopics.
Finding bottlenecks
Explain the USE and RED methods and how you would apply them to find a bottleneck in a Spring Boot service that has become slow.An endpoint in a Spring Boot service takes 2 seconds at p95, but the SQL statements it runs total about 100 ms according to the logs. How would you find where the rest of the time goes?A Spring Boot service handles 300 requests per second fine but falls over at 400: latency climbs sharply and errors appear, while CPU is only 50 percent. What does this pattern suggest and how do you confirm it?End-to-end latency through a chain of seven services has grown slowly over a year and no single team sees a problem in its own service. How would you lead the investigation across teams?Thread pool and connection pool tuning
What are the default Tomcat request thread limit and HikariCP pool size in Spring Boot, and what happens when all database connections are in use?A team raised HikariCPmaximumPoolSize from 10 to 100 on each of 8 pods to fix timeouts. The database CPU went to 100 percent and latency got worse. Explain why and how you would size the pool.Your team plans to enable virtual threads with spring.threads.virtual.enabled=true on a Spring Boot 3.5 MVC service. How does that change how you tune thread pools and connection pools?Across your organisation, services set pool sizes by copying values from other services, and several incidents were caused by too many database connections. What standard would you introduce?Your largest shared database is near its connection and CPU limits because hundreds of service instances each open their own pools. As the senior technical leader, how do you decide between tuning, connection proxies, splitting the database, or changing architecture?Latency budgets
A Spring Boot service calls another service withRestClient and has no timeouts configured. Why is this dangerous, and how do timeouts relate to a latency budget?A checkout API must respond within 500 ms at p99 and calls inventory, pricing and payment services. How would you set latency budgets, timeouts and retries?Define how latency budgets should be set and governed on a platform where user requests pass through up to eight Java services.Product teams keep adding synchronous calls and features to the checkout path, and p99 latency has doubled in two years, which hurts conversion. As the senior technical leader, how do you introduce performance budgets that the organisation respects?Load testing
What is the difference between open and closed workload models in load testing, and why can a closed model hide latency problems?Plan a load test for a new Spring Boot order service before launch. What do you test, how, and what do you collect?Your organisation wants performance regressions caught before production across 80 services. Design a performance testing approach that teams will actually use.Capacity planning at your company is done by adding servers before each peak season, and costs grow faster than traffic. As the senior technical leader, how do you change capacity planning into a disciplined process?Your company is deciding whether to fund a permanent production-scale performance environment or rely on testing in production with synthetic traffic and canaries. As the senior technical leader, how do you decide?Profiling a Spring application
How would you profile CPU usage and allocations of a Spring Boot application running in production with low overhead?A Spring Boot application takes 45 seconds to start, which slows deployments and autoscaling. How would you find what is slow and what would you change?A flame graph of a slow Spring Data JPA endpoint shows most time inside Hibernate flush and dirty checking. What is likely happening and how would you fix it?No question matches these choices.