- Can you please brief about yourself?
- You mentioned you worked on some kind of performance — how did you improve that performance?
- Which version of Java are you familiar with?
- Can you please explain some features of Java 8 and what new features were introduced in Java 11?
- What is lambda in Java 8, how is it used, and how has it been improved in Java 11 (particularly with the
varkeyword)? How have you used it in day-to-day activities? - What do you know about the Stream API and how does it differ from Collections?
- What are the differences between Stream and Parallel Stream in Java?
- (Coding exercise) Find the first non-repeating character in the string
"ITISAJAVAWORK". - Why did you not use Stream API in the solution? Can you rewrite it using streams?
- Why did you use
LinkedHashMapin the stream solution? - What are the other Map implementations (data structures) available in Java besides
HashMapandLinkedHashMap? - Can you explain the Spring Boot application lifecycle — when is the
runmethod invoked and when isdestroyinvoked? What is the flow when the application starts? - How do you handle transactions in Spring Boot?
- What annotations and propagation levels have you used for rollback and isolation?
- If you give
@Transactionalat the class level vs. method level, what will happen? - Which is a better practice —
@Transactionalat class level or method level? - How does Spring Security work internally?
- What is the difference between authentication and authorization?
- What is your thought process for designing a microservice architecture?
- Do you have experience building a CI/CD pipeline, and which tool have you used?
- Which observability tool have you used to check test case coverage (e.g., how do you know how much coverage your JUnit tests provide)?
- Which cloud have you worked on, and what AWS services do you have knowledge of?
- Why do we need to use AWS Lambda?
- How do you approach and solve a deadlock situation when you find it in application logs?
- An Angular application is rendering very slowly in the UI, but API calls are responding quickly. What is your approach to investigate this?
- An application running in production on AWS cloud suddenly became very slow after onboarding a couple of new users. You have full AWS console access — what is your approach to investigate and resolve this?
- How do you dynamically refresh or update user statistics at regular intervals without manual API calls or application restarts?
- Tell me about yourself.
- Have you built any AI agents or worked on anything related to AI recently?
- What Java version are you currently working with?
- What are the features introduced in Java 17?
- When an application has performance issues and high latencies, what is your strategy for identifying and debugging the root cause?
- How do you debug performance issues in a legacy application that does not have sufficient logging?
- How do you implement both synchronous and asynchronous APIs using Spring Boot?
- What are the limitations of threads in Spring Boot, particularly when implementing synchronous and asynchronous APIs in microservices?
- For a use case handling millions of transactions involving both upserts and reads, what is your mechanism for choosing the right database (RDS, NoSQL, etc.)?
- How do you handle aggregations when dealing with millions of transactions in a database?
- What is the complexity of aggregations, and how do you handle scenarios with too many I/O operations?
- What caching mechanisms are available in Spring Boot, and in which scenarios is caching explicitly recommended?
- In a Kubernetes cluster with Service 1 and Service 2, how do you enable internal communication between them without routing through external traffic?
- How do you register the domain name for services in Kubernetes for internal communication?
- What security mechanisms can be implemented to secure an API?
- How do you implement rate limiting where requests beyond 10,000 should wait (not fail) until the next allowed processing slot?
- When using a queue for rate limiting, how do you process the queued requests and what triggers their processing when new requests keep coming continuously?
- What design pattern do you recommend for handling rate limiting with queues?
- What is the role of the API Gateway in this rate-limiting architecture?
- What are the advantages of Kafka over traditional message queues? What is the difference between a queue and Kafka?
- What concept or design pattern does Kafka work on?
- What is lazy loading in Spring Boot, and when should we use it?
- What is the syntax for implementing lazy loading in Spring Boot?
- How do you externalize application secrets (passwords, sensitive information) so they can be accessed dynamically without committing them to code?
- What other mechanisms exist for externalizing secrets that also support tracking change history?
- What is the difference between HashiCorp Vault and Kubernetes Secrets for secret management?
- What is the difference between AWS Secrets Manager and Kubernetes Secrets, especially regarding change history?
- What is the difference between EKS (Elastic Kubernetes Service) and ECS (Elastic Container Service)?
- If ECS offers similar features, why should we choose EKS?
- Have you used GitHub Copilot? What features have you used in day-to-day activities?
- Have you used any Spring AI tools? Where can Spring AI be used?
Q1. You are an architect. A Jira has been assigned to your junior, they raised a PR, you reviewed and merged it. Explain exactly how the code flows from the PR merge all the way to your QA environment where a Kubernetes container has the updated code deployed.
Q2. What CI/CD tools do you use, and where exactly are the pipeline phases (Maven build, unit tests, sonar coverage, end-to-end tests) actually executed when the PR is merged? Is it on your local machine, an AWS EC2, or somewhere else?
Q3. After the build stage produces a JAR/WAR file, how does it get saved into Docker Hub as an image? And after pushing to Docker Hub, where is the deployment configuration stored?
Q4. In an AWS setup with an ASG and Network Load Balancer, when the ASG scales out and spins up new EC2 instances, how does the NLB know it needs to perform health checks on those new instances?
Q5. How does the NLB know to start checking the health of the newly launched instances (e.g., instance 3 and 4 specifically)? And how does this same dynamic service registration/discovery work in a Kubernetes environment without AWS?
Q6. If your Kubernetes YAML manifests (deployment.yaml, service.yaml, etc.) are managed entirely by the DevOps team, why are they kept in the same source code repository as the application? Should they not be in a separate repo?
Q7. I have an Employee table in PostgreSQL and a Department collection in MongoDB. A product owner wants CRUD operations (POST, GET, PUT, DELETE) on a combined JSON payload that contains both employee details and department details. How would you design this application?
Q8. How do you handle distributed transactions when saving to both PostgreSQL and MongoDB in the same request? How would you implement ACID guarantees across two different databases?
Q9. How do you implement the Saga pattern within a single microservice that has two data sources? Is Saga designed for a single microservice or for multiple microservices? How would you implement 2PC (Two-Phase Commit) in this context?
Q10. Should the design be one microservice with two data sources, or should it be one microservice per database with the Saga pattern coordinating across services? Which approach is architecturally correct and why?
Q11. In a two-microservice design, how will you pass data from the Employee microservice to the Department microservice? What technology/mechanism will you use in between?
Q12. How will microservices intercommunicate when implementing the Saga design pattern? Is Kafka or MQ the only option, or are there alternatives?
Q13. If using RestTemplate for inter-service communication, and there are 5 pods of the Department microservice running, how does RestTemplate know which pod to call and how to distribute requests in a round-robin manner?
Q14. Will you implement a separate load balancer for the Department microservice, or how exactly does load balancing work for each microservice?
Q15. How do you implement service discovery and service registry in your project? How exactly do you define these settings in your configuration files (application.yml)?
Q16. Which configuration file and exactly how do you define service registry/discovery settings so that microservices can discover and call each other?
Q17. In Kafka, the Employee service pushes a message to topic T1 on partition P1. The Department service has 5 instances (D1 to D5) all listening on T1/P1. Will one specific instance get the message, all five instances, or a random subset? Exactly how does Kafka work in this scenario?
Q18. If topic T1 has only one partition and the single active consumer instance (say D1) goes down due to an OutOfMemoryError, the other four instances are idle. Isn't this a fault tolerance flaw? How does Kafka handle this?
Q19. There is a third microservice called "Social Group." When the Employee service publishes to T1/P1, both the Department service AND the Social Group service need to receive the same message. How do you configure Kafka so that both services independently consume every message?
Q20. If a developer forgets to define a consumer group ID in the Department service configuration, what exactly will happen in Kafka?
Q21. You have a list of Employee objects. Each Employee has: name, salary, id, and a Department object (with departmentId and departmentName). Write a Java Stream API code that returns the department name and the total salary paid by each department.
Q22. What is the functional interface that Collectors.groupingBy() uses internally?
Q23. What kind of functional interface is Function? What are the different categories/kinds of functional interfaces available in Java 8?
Q24. Now write the equivalent SQL query for the above Java Stream grouping operation — given that Employee and Department are two separate tables in PostgreSQL. The query should return department name and total salary per department.
Q25. The SQL query you wrote has an issue. If a department exists in the department table but has no employees assigned to it, will it appear in the results? What is the issue and how do you fix it?
Q26. When fixing the JOIN type, should you use LEFT JOIN, RIGHT JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, or FULL JOIN? Explain your choice.
Q27. In production, whenever a POST or GET request is sent, it always times out. Checking the logs shows the request arrived (log statement present) but no errors anywhere. The issue cannot be reproduced in any other environment. What could be the reason and how would you investigate and fix this?
Q28. You suspect thread pool exhaustion. How do you actually check the threads? How will you concretely prove that it was due to thread pool exhaustion?
Q29. Have you ever analyzed a heap dump in your career? Have you used GC optimization JVM arguments in any of your projects?
Q30. In production, how do you check and aggregate logs from multiple different microservices? How does all the logs from all microservices get into Splunk — what is the mechanism?
Q31. There is a requirement to run a COUNT query on the Employee table every 10 minutes and publish the count to logs so that Splunk can monitor it and alert if the count goes unusually high or low. How would you implement this in Java/Spring Boot?
Q32. Your Employee microservice currently has 10 instances. If you implement a @Scheduled job as described above, won't that job run on all 10 instances simultaneously and produce 10 duplicate log entries in Splunk? How do you solve this?
========================================== END OF QUESTIONS Total: 32 questions across 8 topic areas
Total: 27 questions (ABC) + 31 questions (LTIM) = 58 questions