Essential Go Backend Interview Questions: MySQL, Docker, Redis, and More
This article compiles a comprehensive set of high‑frequency interview questions for Go backend positions, covering Go fundamentals, concurrency, runtime, microservices, Docker, Redis, MySQL, and related concepts, originally gathered from a candidate's experience at ByteDance.
Introduction
The author shares a collection of interview questions encountered during a backend interview at ByteDance (also known as Bytedance). The list focuses on Go language, system fundamentals, container technology, databases, and related topics, providing a valuable reference for candidates preparing for similar technical interviews.
Go Fundamentals
Advantages of using Go compared to other languages
Data types supported by Go
Purpose of packages in Go programs
Type conversion forms in Go (e.g., converting integers to floats)
Definition of goroutine and how to stop one
Runtime type checking of variables
Relationships between two interfaces
Characteristics and purpose of synchronization locks
Features and cautions of channels, including buffered channels
Usage of the cap function
Purpose of go convey Difference between new and make, and the role of make Differences among printf, sprintf, and fprintf Distinction between arrays and slices
Value vs. address (reference) passing with examples
How slice expansion works in Go
Execution order and purpose of defer Underlying implementation of Go slices and their expansion mechanisms
Parameter passing and reference types in Go
Go Concurrency
Various states of a mutex
Normal mode vs. starvation mode of a mutex
Conditions under which a mutex may spin
Implementation of RWMutex and its cautions
Definition of cond, differences between broadcast and signal
Usage of waitgroup and its implementation principle
Purpose of sync.Once What constitutes an atomic operation and how it differs from locks
Definition of CAS (compare‑and‑swap)
Use cases for
sync.PoolGo Runtime
Definition of goroutine
Explanation of the GMP model (Goroutine‑Machine‑Processor)
Scheduling flow and work‑stealing mechanism
Hand‑off mechanism and cooperative vs. preemptive scheduling
Signal‑based preemptive scheduling
Blocking points in the scheduler
Role of sysmon Three‑color marking principle for GC
Insertion, deletion, and mixed write barriers
GC trigger timing and overall GC process
GC tuning tips
Microservices
Understanding of microservices and their advantages
Key characteristics and best practices for designing microservices
How microservice architecture operates and its pros/cons
Differences between monolithic, SOA, and microservice architectures
Challenges when adopting microservices
Domain‑Driven Design (DDD) concepts and why it is needed
Concepts of cohesion and coupling
REST/RESTful basics and usage
Types of microservice testing
Container Technology (Docker)
Why DevOps is needed
Definition and advantages of Docker
Purpose of CI services
How to create environment‑independent containers with Docker
Differences between COPY and ADD in Dockerfiles
Explanation of Docker images, containers, and Docker Hub
Typical Docker container lifecycle stages
Common Dockerfile instructions
Stateless vs. stateful applications for Docker
Basic Docker workflow
Differences between Docker images and layers
Virtualization vs. containerization concepts
Docker Swarm overview
Monitoring Docker containers
Handling container resource limits and virtualization types
Differences between full virtualization and paravirtualization
On‑build instruction usage
Running Docker natively on Windows and non‑Linux platforms
Underlying principles of containerization
Pros and cons of containerization vs. virtualization
Adapting Docker to multiple environments
Reasoning behind Docker Compose’s non‑blocking start strategy
Redis
What Redis is and its data types
Benefits of using Redis compared to Memcached
Persistence mechanisms and their trade‑offs
Common performance issues and solutions
Expiration key removal strategies
Eviction policies
Why Redis stores all data in memory
Synchronization mechanisms
Pipeline advantages
Cluster architecture, master‑slave replication, and failure scenarios
Java clients (Jedis vs. Redisson) comparison
Setting passwords and authentication
Hash slot concept
Cluster node limits and database selection
Testing connectivity
Understanding Redis transactions and related commands
Key expiration vs. permanent storage
Memory optimization techniques
How the Redis eviction process works
Impact when Redis memory is exhausted
Maximum number of keys per instance
MySQL
Three normal forms
Permission‑related system tables
BINLOG formats and differences
Storage engine differences (MyISAM vs. InnoDB)
Definition and types of indexes, their pros and cons
Various lock types in MySQL
Four transaction isolation levels and their distinctions
Difference between CHAR and VARCHAR
Primary key vs. candidate key
Conversion between UNIX timestamps and MySQL timestamps
Storage format of MyISAM tables
Best field type for storing monetary values
Considerations when creating indexes
When indexes may not improve query performance
Handling massive data (million‑row) deletions
Left‑most principle in index usage
Clustered vs. non‑clustered indexes and when to use each
MySQL connector, query cache, analyzer, optimizer, executor
Temporary tables usage and cleanup
Differences between outer and inner joins
Notes on using UNION and UNION ALL
Characteristics of MyISAM and InnoDB storage engines
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.
Go Development Architecture Practice
Daily sharing of Golang-related technical articles, practical resources, language news, tutorials, real-world projects, and more. Looking forward to growing together. Let's go!
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.
