Interview Experiences and Technical Questions from Major Chinese Tech Companies (JD, Meituan, Alibaba, Toutiao, Kuaishou)
The author, a second‑year master's student in Java backend development, summarizes interview questions and experiences from JD, Meituan, Alibaba, Toutiao and Kuaishou, covering Java concurrency, JVM locking, Netty, Redis, MySQL/HBase, distributed systems, and several algorithm problems.
The author, a second‑year master's student specializing in Java backend development, shares interview experiences and technical questions encountered at major Chinese tech companies, including JD, Meituan, Alibaba, Toutiao, and Kuaishou.
JD
First Round
Types of locks in Java: optimistic vs. pessimistic, exclusive vs. shared, reentrant vs. non‑reentrant, fair vs. unfair, lightweight vs. heavyweight.
JVM lock optimizations: lock upgrade, lock coarsening, lock elimination; the transition from biased lock → lightweight lock → heavyweight lock.
Usage of volatile: prevents instruction reordering and ensures visibility, often used in double‑checked locking for singleton implementation.
Thread creation methods: extending Thread, implementing Runnable or Callable, or using thread pools.
Core parameters and working mechanism of thread pools (standard interview answer).
Rejection policies of thread pools (standard interview answer).
Differences between NIO and BIO; non‑blocking I/O uses OS APIs with NON_BLOCK flag and often works with selectors (select, poll, epoll).
Differences among select, poll, epoll: select copies file descriptors between user and kernel space, poll improves but still requires polling, epoll is event‑driven and notifies the user thread directly.
Experience with OS‑level epoll implementation: none.
Brief introduction to Netty and its usage in projects.
How Netty solves the TCP sticky‑packet problem: using handlers, line delimiters, length fields, or HTTP content‑length.
MySQL experience: not used directly, used HBase instead.
MySQL index data structure and rationale (standard answer).
Redis experience and description of SDS (Simple Dynamic String) structure.
Redis deployment modes: standalone, cluster, Sentinel.
Redis master‑slave replication process (unknown).
Algorithm question: reverse a linked list in groups of k.
Second Round
The second round focused on the candidate's projects, including traffic flow, micro‑service decomposition, QPS, and a brief HQL question.
Algorithm question: bubble sort (mistakenly implemented as selection sort).
Meituan
First Round
Project overview and discussion of difficulties; Java fundamentals were not heavily questioned. Additional questions:
Redis master‑slave synchronization process.
Why choose HBase over MySQL; differences and technology selection criteria.
HBase latency for a single call.
Principles of HBase indexing.
Message queue basics; how Kafka ensures high‑performance I/O (sequential disk writes, zero‑copy, batch processing).
Algorithm question: convert an Arabic number to uppercase Chinese numerals.
Discussion on performance of switch vs. if statements.
Second Round
Project challenges and solutions.
Usage of Netty in the project.
Netty event‑loop mechanism.
Netty thread model (Reactor pattern).
Third Round
Mostly non‑technical questions about requirements review, work schedule, team building, and reading habits.
Algorithm question: find a target value in a rotated sorted array using binary search.
Alibaba
First Round
Fault tolerance, rate limiting, degradation, and fallback strategies in the project.
Multi‑level caching (client cache, CDN) for service degradation.
Personalized content delivery ("thousand‑person‑one‑face").
MySQL multi‑active‑active deployment across regions.
Message queue usage scenarios.
Netty introduction and usage.
RPC framework (Thrift) and its serialization protocol.
Redis master‑slave synchronization (full and incremental).
Sorting extremely large files.
Database multi‑active‑active solutions.
Second Round
In‑depth discussion of the project without generic interview questions.
Third Round
Discussion about offers, salary expectations, and overall fit.
Toutiao
First Round
Project presentation followed by technical questions:
Redis QPS capacity for a single instance.
How to avoid hotspot keys in Redis.
Common Redis data structures and SDS.
Skip‑list data structure, query complexity, and insertion process.
Reasons for choosing HBase over MySQL and its advantages.
Differences between HBase and MySQL indexes.
Implementation principles of HashMap and ConcurrentHashMap.
CAS concept, drawbacks, and solutions.
Measures to avoid HBase hotspot keys.
Online incident resolution examples.
Algorithm question: generate all combinations of size k from an array.
Second Round
Project deep‑dive with additional questions on micro‑service decomposition, traffic flow, DNS/CDN relationship, MySQL sharding, multithreading, CountDownLatch, and DCL singleton implementation with volatile.
Algorithm question: minimum jumps to reach the end of an array.
Third Round
Project discussion and questions on:
Difference between == and equals in Java; importance of overriding hashCode.
Pass‑by‑value vs. pass‑by‑reference in method calls.
Design patterns used in the project.
Intelligence question: fuel‑sharing problem with four cars.
Algorithm question: 0‑1 knapsack problem.
Kuaishou
First Round
Project overview; high‑concurrency measures discussed (message queues, read/write separation, hot‑key avoidance, caching).
IO concepts: blocking, non‑blocking, asynchronous non‑blocking.
Explanation of asynchronous blocking I/O.
Netty and its solution to TCP sticky‑packet problem.
Redis threading model and why Redis is considered single‑threaded.
Redis characteristics and high‑availability mechanisms.
Redis persistence mechanisms.
Redis eviction policies.
Distributed lock implementation and usage.
Message‑queue reliability guarantees.
Idempotency handling in message consumption.
Algorithm question: implement a queue using an array.
Second Round
Project discussion followed by deeper technical queries:
Service registration and discovery using ZooKeeper.
Reasons for using ZooKeeper and its features.
Service discovery process.
RPC routing rules with weighted random routing.
Handling version overlap during service upgrades.
Algorithm question: implement a blocking queue.
Code example (Java bounded buffer) kept intact:
class BoundedBuffer {
final Lock lock = new ReentrantLock();
final Condition notFull = lock.newCondition();
final Condition notEmpty = lock.newCondition();
final Object[] items = new Object[100];
int putptr, takeptr, count;
public void put(Object x) throws InterruptedException {
lock.lock();
try {
while (count == items.length)
notFull.await();
items[putptr] = x;
if (++putptr == items.length) putptr = 0;
++count;
notEmpty.signal();
} finally {
lock.unlock();
}
}
public Object take() throws InterruptedException {
lock.lock();
try {
while (count == 0)
notEmpty.await();
Object x = items[takeptr];
if (++takeptr == items.length) takeptr = 0;
--count;
notFull.signal();
return x;
} finally {
lock.unlock();
}
}
}Third Round
Project presentation followed by troubleshooting questions about long‑latency issues, cache usage, cache penetration, and mitigation strategies.
Algorithm question: determine whether a binary tree is symmetric.
Summary
Overall, JD provided the best interview experience, followed by Alibaba and Meituan. Each company's interview style varies: Alibaba focuses heavily on project details with few algorithm questions, while Toutiao emphasizes algorithm performance and expects correct solutions.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Selected Java Interview Questions
A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
