What Can You Earn at REDstar? Plus Essential MySQL, Redis, and Java Interview Secrets

The article reveals REDstar algorithm and developer salary packages, explains why Xiaohongshu’s work schedule changed, and then provides detailed Java interview questions covering MySQL indexes, composite indexes, Java primitive types, boxing/unboxing, ReentrantLock vs synchronized, Redis usage, common commands, distributed locking, and the benefits of RocketMQ, all illustrated with code snippets and diagrams.

IT Services Circle
IT Services Circle
IT Services Circle
What Can You Earn at REDstar? Plus Essential MySQL, Redis, and Java Interview Secrets

Yesterday, Xiaohongshu announced the REDstar Top Talent Program, an early recruitment batch focusing on algorithm positions such as search recommendation, large‑model algorithms, and machine learning.

The company claims salaries can exceed one million RMB, and graduates within three years can apply.

Algorithm Position Salary Packages (2022)

Algorithm (master, 985): 55k ×12×1.18 + 55k×4 + 100k signing bonus + 300k stock → total >1M RMB.

Algorithm (master, 985): 45k ×12×1.18 + 45k×4 + unknown signing/stock → total ≈900k RMB.

Algorithm (master, 985): 37k ×12×1.18 + 37k×4 + unknown signing/stock → total ≈800k RMB.

Algorithm positions require high academic standards, including strong research papers.

Developer Position Salary Packages (2022)

Entry‑level: 24k ×16 + overtime → total ≈40k RMB.

SP offer: 26‑28k ×16 + overtime + signing bonus + stock → total 50‑60k RMB.

SSP offer: 30‑33k ×16 + overtime + signing bonus + stock → total 60‑70k RMB.

Xiaohongshu used to follow a “big‑small week” schedule; after May 1, 2023 the company switched back to a normal double‑week, removing overtime pay and reducing monthly income by about 15%.

Java Development Interview (First Round)

1. Why use indexes in MySQL?

Indexes act like a book’s table of contents, reducing the amount of data scanned and speeding up queries. Without an index, a full table scan has O(N) complexity; with a B+‑tree index, lookup is O(log N). Indexes also help sorting, grouping, and eliminating duplicate operations. SELECT * FROM user WHERE id=100; -- full scan With an index on id, the engine can locate the row directly, turning seconds‑level scans into milliseconds‑level lookups.

2. What is a composite index and how should it be used?

A composite index combines multiple columns (e.g., (col1, col2, col3)) into a single B+‑tree. Queries must start with the leftmost column; otherwise the index cannot be used.

WHERE col1='a';                     -- uses col1
WHERE col1='a' AND col2='b';        -- uses col1, col2
WHERE col1='a' AND col2='b' AND col3='c'; -- uses all three

3. Does the query SELECT * FROM a WHERE a=? AND b>? AND c=? use the index?

It can use the index for columns (a, b) but not for c because b is a range condition, which prevents the optimizer from using subsequent columns.

4. Java primitive types and size of int vs long

int

occupies 4 bytes; long occupies 8 bytes (twice the size) and has a much larger value range, suitable for timestamps and large numeric calculations.

5. What are boxing and unboxing?

Boxing converts a primitive type to its wrapper class; unboxing converts the wrapper back to the primitive. Automatic boxing occurs during assignment and method invocation, but can create many temporary objects in tight loops, harming performance.

Integer i = 10;          // boxing
int n = i;               // unboxing

6. Differences between ReentrantLock and synchronized

Usage: synchronized can annotate methods, static methods, or blocks; ReentrantLock works only in code blocks.

Lock acquisition/release: synchronized is automatic; ReentrantLock requires explicit lock() and unlock().

Fairness: synchronized is non‑fair; ReentrantLock can be configured as fair or non‑fair.

Interruptibility: ReentrantLock can respond to interrupts; synchronized cannot.

Implementation: synchronized is built into the JVM monitor; ReentrantLock is based on AQS.

7. Why use Redis?

Redis provides high performance (memory‑level speed) and high concurrency (QPS up to 100 k, ten times MySQL). Caching frequently accessed MySQL data in Redis reduces latency, while Redis can also serve as a distributed lock store.

8. Common Redis commands

String: SET, GET, INCR

Hash: HSET, HGET, HGETALL

List: LPUSH, RPUSH, LRANGE

Set: SADD, SMEMBERS, SINTER

Sorted Set: ZADD, ZRANGE, ZREVRANGE

9. How to implement a Redis distributed lock

Use SET lock_key unique_value NX PX 10000 to acquire a lock atomically with a timeout. Release the lock with a Lua script that deletes the key only if the stored value matches the client’s unique identifier.

// Lua script for safe unlock
if redis.call("get", KEYS[1]) == ARGV[1] then
    return redis.call("del", KEYS[1])
else
    return 0
end

10. Why choose RocketMQ?

Message queues provide decoupling, asynchronous processing, and traffic shaping (peak‑shaving), which improve system stability and user experience.

Java primitive type table
Java primitive type table
Redis distributed lock diagram
Redis distributed lock diagram
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.

RedismysqlinterviewsalaryREDstar
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

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.