Top Java Backend Interview Questions: Microservices, Redis, MySQL & More

This article compiles a comprehensive set of interview questions encountered across four technical rounds and an HR session for a major Chinese tech company, covering Java backend architecture, microservices design, RocketMQ, Redis internals, database consistency, networking, algorithms, and practical troubleshooting tips.

Java Backend Technology
Java Backend Technology
Java Backend Technology
Top Java Backend Interview Questions: Microservices, Redis, MySQL & More

First Round (Architecture Focus)

1. Introduce yourself and discuss project experience.

2. How are microservices divided in your projects, and how is the granularity determined?

3. What problems have you encountered when implementing microservice architecture?

4. How do you handle data consistency between microservices?

5. Why did you choose RocketMQ over other MQ solutions?

6. Why does RocketMQ use a custom NameServer cluster instead of ZooKeeper?

7. Can ZooKeeper provide services while participating in leader election?

8. What do you know about the Paxos algorithm?

9. Design a high‑traffic “red‑packet” system for a Spring Festival gala.

10. Any questions for the interviewer?

~Interview lasted about 40 minutes.

Second Round (Low‑Level and Algorithms)

1. Discuss project experience again.

2. How well do you understand Redis’s underlying data structures?

3. What are the advantages and disadvantages of the dynamic string (SDS) used in Redis?

4. What are the pros and cons of Redis’s single‑threaded nature?

5. Which Redis data structures have you used and in what scenarios?

6. How do you solve cache breakdown issues? (Likely answer: Hystrix)

7. What isolation mechanisms does Hystrix provide and what are its common configurations?

8. Describe any performance tuning you have done (JVM, database, etc.).

9. Given a scenario, how would you tune the system?

10. Solve an algorithm problem (link provided in the original source).

Third Round (Core Concepts)

1. Describe your fundamental knowledge and project background.

2. Which data structures do you use regularly?

3. Compare the advantages and disadvantages of linked lists versus arrays.

4. What methods exist to resolve hash collisions?

5. Explain HashMap and its difference from WeakHashMap.

6. What changes were introduced in JDK 1.8 compared to JDK 1.7 implementation of HashMap?

7. Do you use RPC or REST for microservice communication?

8. What is the relationship between RPC and HTTP?

9. What are the differences between HTTP/1.0 and HTTP/1.1?

10. Explain long‑connection vs short‑connection in HTTP.

11. Describe TCP’s three‑way handshake and four‑way termination, and why three handshakes are required.

12. List TCP states and their meanings.

13. Self‑evaluation question.

Interviewer mentioned there might be additional rounds.

Fourth Round (Database & Operations)

1. Re‑introduce yourself.

2. Describe your database high‑availability architecture.

3. How do you ensure master‑slave consistency?

4. Do you know MySQL’s indexing algorithms?

5. Why does MongoDB use B‑tree indexes while MySQL uses B+‑tree?

6. What issues have you encountered while using MySQL?

7. Which transaction isolation level do you use in production and why?

8. Share your understanding of microservice architecture.

9. Which RPC frameworks have you used and what are their pros and cons?

10. Have you used Docker? Describe your knowledge of containers.

11. Any questions for the interviewer?

HR Interview

Discussed work experience, reasons for leaving, career plans, and compensation. Notably, the interviewer did not ask about salary expectations.

Summary

Interview difficulty: Easy

Interview experience: Positive – no overly tricky questions, but be prepared to discuss your projects thoroughly.

Tip: Ensure you have solid technical strengths before attempting such interviews.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaredismysqlRocketMQinterview
Java Backend Technology
Written by

Java Backend Technology

Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.