Lectures Technopolis. Design of high-load systems (fall 2017)
We are starting to publish the lectures of Technopolis, an educational project of the Odnoklassniki team at the St. Petersburg Polytechnic University of Peter the Great. Creating high-load applications is not only designing and writing code, but also a huge number of other aspects throughout the product life cycle. We will go through the whole process of creating and using a high-load system. Particular attention will be paid to the features of operation, networks, load balancing, memory hierarchy, everyday tools. We will also talk about monitoring, auditing and much more. The lectures of the course are given by a team of experts under the leadership of the leading developer at Odnoklassniki, Vadim Tsesko.
Discussion of the features of the development stages of the Web and information systems, starting with the birth of the Internet and ending with cloud computing. The objectives and content of the course, as well as sources of self-generation of new knowledge on this topic are considered. In conclusion, we talked about an individual project in which each student develops his own distributed key-value repository with HTTP API in Java.
Storage development is divided into three stages: local version, distributed version, load testing and optimization. An informal specification is described for the repository, and a set of functional tests is provided. The choice of technology is not limited by anything (except for the Java language). Decisions are made in the form of a pull request in GitHub.
At the end of the introductory lecture in the live demo mode, the first stage of the course project was completed. It is noted that the third stage uses such popular open load testing tools as wrk and Yandex.Tank, as well as async-profiler for profiling.
Using the messenger as an example, various versions of architectures, their advantages, disadvantages and pitfalls are considered. We touched on issues of performance and optimization. We discuss the popular ways of scaling systems with the aim of increasing performance and fault tolerance. Details on various replication options and data consistency issues. In conclusion, we are talking about caching, using queues and microservices.
The problem of ensuring high availability of distributed services is considered. We discussed the features of operation - the various tasks, roles and teams that solve them. We touched the most important aspects of ITIL, based on the practices developed in Odnoklassniki: configuration management, changes, accessibility, incidents and problems. It also describes the differences in the tools used when administering large systems.
The entire network stack, starting with network cards, TCP / IP and ending with HTTPS and QUIC, is considered in detail from both a theoretical and a practical point of view. Particular attention is paid to the practical features of network implementation in Linux, the most important aspects of TCP, as well as tools to configure and optimize the network. In conclusion, the latest protocols and the motivation for their development.
We talk about what load balancing is, what tasks it solves, what problems it creates. There are common solutions at different levels of the network model: master-slave, L4, GSLB DNS. The topic of the mechanisms of functioning of the CDN: anycast and unicast. Additionally, some types of attacks that can be countered by balancing are considered.
Briefly described the history of the industry, touched upon the evolution of processor architecture and the mechanisms of their work: from the Von Neumann architecture to the pipeline architecture, the specificity of multi-core architecture, multi-level caching and advanced instruction sets. The second part of the lecture is devoted to the main aspects of memory management using the example of Linux: virtual memory, process memory, NUMA, pages, and caching. In conclusion, typical problems, their diagnosis and elimination are considered.
Talked about the diversity of data warehouses. We found out what basic characteristics they have and how they differ from each other. We considered the basic principles of HDD and SSD, their features, as well as highlighted the strengths and weaknesses. Disassembled common optimization methods, the most popular I / O schedulers and file systems. We discussed the need for monitoring data warehouses and what is particularly worth paying attention to. They also identified the basic requirements for storage from high load systems and tried to answer questions about the choice of storage type, which often arise during the design of applications.
The lecture is devoted to the device of modern Java virtual machines and the features of the development of high-loaded Java systems. Understand the main components of the JVM: class loader, interpreter, JIT compiler and garbage collector. The compiler optimizations of the HotSpot JVM and techniques for measuring the performance of Java programs are discussed. It considers the mechanisms of memory management and various GC algorithms: from Mark-Sweep to Shenandoah. Recommendations are given on optimizing server applications, combating pauses and making effective use of the Linux network stack in Java.
The lecture is devoted to monitoring systems in Odnoklassniki, which are charged with the task of detecting anomalies with the equipment and in the work of the portal business logic. It is about what opensource-solutions are used, why the choice fell on them and what problems we encountered in the process of their operation. The first part of the lecture describes the approach we use to choosing monitoring tools when it comes to introducing a new or refining the current solution. The second part is devoted to how our own business logic monitoring system was developed and implemented, and how this system, consisting of many closely related components, is currently operating.
This lecture focuses on cloud computing, the advantages and disadvantages of using Clouds for various tasks. IaaS, PaaS, SaaS and classic IT models are compared. It is told about virtualization and its support in OS and modern central processors. It states what the differences between virtual machines and containers are, and “live” considers how containerization works using the example of Docker. Explains what opportunities provide cloud solutions providers on the example of AWS, Google Gloud, Azure, and also, why you need your own cloud for internal needs and, in the most general terms, how it is done.
The playlist of all lectures is on the link , as well as on youtube by reference .
Broadcasts and video recordings of other Technopolis project courses can be found in the official project group in OK .
We also remind that on Tehnostrim channel there are current lectures and master classes on programming and data analysis from IT-specialists from all educational projects of Mail.Ru Group - Technoatom, Technopark, Technopolis, Technosphere and Technotrak.