
Introduction to Reliable and Secure Distributed Programming (https://www.amazon.de/-/en/Christian-Cachin/dp/3642152597).
I took a class with Luis Rodrigues (one of the authors), the book introduces the fundamentals of distributed systems. For example, you would build leader election from first principles.
I never read the book, but took a course with author based on this book. It was fun and interesting; covering both basic and advanced concepts in distributed systems.