Архитектура: история и будущее на примере ВКонтакте / Александр Тоболь (ВКонтакте)
Introduction and Story
The speaker introduces himself as Alexander Tobolev, a technical director of various services. He mentions that he was told an interesting story a few minutes ago and shares that he will be discussing high-load systems in his presentation.
The Interesting Story
- Alexander Tobolev introduces himself as the technical director of various services.
- He mentions being told an interesting story a few minutes ago.
- The story is about the importance of learning a couple of sentences before starting something new.
- There is only one problem - he hasn't learned those sentences yet.
Definition of High-load Systems
The speaker discusses the definition of high-load systems and conducts a survey to understand what it means to the audience.
Survey on High-load Systems
The Difference Between Architecture and Structure
In this section, the speaker discusses the difference between architecture and structure in the context of software development.
Understanding Structure and Architecture
- Structure refers to a set of rules and processes that define how a system is organized to meet functional requirements, quality criteria, and user needs.
- Architecture goes beyond structure by providing an internal set of rules for making decisions and implementing new solutions. It is a social phenomenon that guides the creation of new solutions and changes in structure.
- A good architecture should be reliable, scalable, easy to maintain, and sustainable.
The Evolution of IT Industry
- The IT industry has evolved over time. People born between 1985-1994 experienced computers mainly at work with predictable schedules.
- The dot-com bubble era brought significant changes with internet companies operating 24/7, DSL modems, multimedia content distribution, etc.
- After the dot-com crisis, there was an abundance of free equipment available which led to the growth of Russian services like Mail.ru and Yandex.
Defining Software Architecture
This section focuses on defining software architecture as a set of rules developed by groups of individuals that guide decision-making processes.
Characteristics of Software Architecture
- Software architecture is a set of rules and processes developed by groups that guide decision-making processes.
Era of Efficient Development
The speaker discusses the era of efficient development and the advancements in hardware and understanding. They mention the importance of reading and staying updated on developments from 2000 to 2003, as well as the shift towards more efficient hardware and algorithms.
Advancements in Hardware and Understanding
- The speaker highlights the significance of advancements in hardware, particularly in terms of commodity iron.
- Research conducted by institutions like Berkeley suggests that commodity iron is superior to mainframes.
- Algorithms play a crucial role in determining the efficiency and effectiveness of hardware.
- Open Source technologies emerged victorious over proprietary solutions, leading to improved development practices.
Web 2.0 and Cloud Computing
This section focuses on the emergence of Web 2.0, which brought about significant changes in the industry. It also introduces cloud computing as a game-changer for infrastructure.
Rise of Web 2.0
- The advent of Web 2.0 led to the proliferation of various services such as recommender systems and big data analytics.
- Traditional mainframe computers transformed into data centers with scalable resources.
- Data centers became powerful computers capable of scaling CPU, memory, and disk capacities.
Era of Cloud Computing
- Cloud computing gained prominence around 2010 due to its cost-effectiveness and high availability.
- Machine learning (ML), computer vision, and other resource-intensive tasks became accessible through cloud-based platforms.
- However, future prospects become uncertain due to limitations imposed by Moore's Law.
Moore's Law Limitations
New Section
The importance of open source and the need for architectural considerations in creating unique solutions.
Open Source and Architecture
- Open source development means that within a single corporation, it is not possible to create a closed, unique solution.
- Either the solution becomes an infrastructure panacea or it fails, requiring replacement with another solution.
- Architectural requirements play a crucial role in building successful solutions.
New Section
Exploring the evolving architecture and the importance of selecting key elements.
Evolving Architecture
- Modern architectures emphasize various types of "ilities" such as volatility, portability, and mobilitiy.
- It is essential to choose important elements based on user feedback and needs.
- VKontakte experienced issues related to reliability and scalability due to increasing user demands.
New Section
The significance of reliability, scalability, and speed in product quality.
Reliability and Scalability
- VKontakte faced challenges when users reported issues after 10 minutes of partial downtime.
- Reliability and scalability are crucial for handling user demands effectively.
- To maintain reliability, VKontakte needed to handle increased loads without compromising performance.
New Section
The growth of codebase at VKontakte and the importance of developer convenience.
Codebase Growth
- The number of commits and changes in VKontakte's codebase has increased significantly over time.
- Developer convenience is vital for efficient development processes.
- VKontakte's codebase has grown by 60% in six months, surpassing previous years' growth rates.
New Section
Prioritizing quality, time-to-market, responsiveness, and big data handling.
User Feedback and Quality
- VKontakte values user feedback to address bugs and add new functionalities.
- Quality, time-to-market, and responsiveness are crucial for user satisfaction.
- VKontakte aims to provide unique features and recommendations based on its vast resources.
Introduction to Custom Logic and Microservices
In this section, the speaker introduces the concept of custom logic and microservices in the context of data processing. They mention the use of custom tools for RPC (Remote Procedure Call) and network communication with replication. The speaker highlights that microservices were already being used at VKontakte in 2011.
Custom Logic and Data Processing
- Custom logic was implemented to handle data processing in a microservice architecture.
- Various tools were used for RPC and network communication with replication.
- The database used was not a pure form but had custom logic implemented.
Comparison with LSM Trees
- In 2009, a structure was developed at VKontakte to compete with LSM (Log-Structured Merge) trees.
- While it was not as advanced as LSM trees, it had its own advantages and disadvantages.
- This structure played a role in handling data processing within the microservice architecture.
Mobile Applications and User Growth
- In 2011, VKontakte introduced mobile applications starting with iOS followed by Android.
- The user base grew to over 30 million users.
Introduction to DNS and Geo-DNS
In this section, the speaker introduces the concept of DNS (Domain Name System) and discusses the challenges faced with traditional DNS caching. They also mention the use of Geo-DNS for load balancing but highlight its limitations.
Traditional DNS Caching Challenges
- Traditional DNS caching led to downtime if a server went down.
- Geo-DNS was attempted but did not work effectively in production.
Anycast as a Solution
- Anycast allows announcing one IP address from multiple operators.
- This enables users to connect to the nearest server based on hop count.
- However, it becomes difficult to redirect traffic if a specific server is overloaded.
Implementing Anycast and its Limitations
The speaker explains how they implemented anycast for load balancing and highlights some limitations associated with it.
Implementing Anycast
- Two types of caches were used: reliable data centers (Big Four) and less reliable operators.
- Non-anycast solutions like custom listening servers were also utilized for quality assurance.
Limitations of Anycast
- Difficulty in scaling when dealing with overloaded servers in specific locations.
- Balancing traffic between different operator caches was challenging.
BGP-based Scaling and Challenges
The speaker discusses using BGP (Border Gateway Protocol) for scaling and addressing challenges related to user location-specific content delivery.
BGP-based Scaling
- Cache operators act as small providers serving specific IP ranges.
Difference in Handling Large Projects
The speaker discusses the ability to handle large projects efficiently, citing an example of processing over 8 million lines of PHP code in just a minute. They also mention that for smaller tasks like checking code availability or arguments, it takes only a few seconds.
Handling Large Projects
- The speaker highlights their capability to handle large projects with over 8 million lines of PHP code.
- Processing such a large amount of code takes only a minute.
- For smaller tasks like checking code availability or arguments, it takes only a few seconds.
Introduction of New Products and Development Teams
The speaker mentions the introduction of new products and development teams in 2020. They discuss the growth in user base and the hype around microservices. Additionally, they mention adding Go and Java solutions to their infrastructure.
New Products and Development Teams
- In 2020, new products were introduced along with new development teams.
- VKontakte had already reached 97 million users at that time.
- Microservices gained popularity, and they integrated Go and Java solutions into their infrastructure.
Additional Solutions and Changes
The speaker talks about adding additional solutions like speech recognition, image transformation, and working with Java services. They also mention the transition from KPHP to becoming a custom language with strict typing support.
Additional Solutions and Changes
- Various additional solutions were added, including speech recognition and image transformation using Go.
- Working with Java services, especially media services, was also implemented.
Introduction to JavaScript Browser and Backend Access
In this section, the speaker discusses the limitations of JavaScript in the browser and introduces the concept of accessing the backend using JavaScript. They mention the possibility of calculating formulas on the client-side and gaining access to the backend if needed.
JavaScript Limitations in Browser
- JavaScript in browsers has limitations.
- It is not capable of certain specific tasks.
- Calculating formulas on JavaScript may be limited.
- Access to backend can be granted as a solution.
Backend Access Options
- If client-side calculations fail, users can gain access to the backend.
- A challenging captcha may be used as an alternative option.
- New requirements for resilience were introduced in 2020.
Building a Data Center with Automatic Failover
The speaker explains how they built a data center with automatic failover capabilities to ensure high availability and resilience. They mention using complex consensus algorithms and hardware optimizations for their 10,000 backends.
Automatic Failover Implementation
- To achieve automatic failover, complex consensus algorithms were chosen.
- Hardware optimizations were made for their 10,000 backends.
- Binding NUMA cores increased backend capacity by 20%.
Development Process and Deployment
This section discusses the development process and deployment strategies used at VKontakte. It highlights the efficiency of their checklist for developers, the speed of code compilation, and the testing procedures involved.
Development Process
- The checklist for developers is completed in a couple of hours, while it takes only 10 minutes for developers to go through it.
- The codebase at VKontakte consists of around 8 million lines of code, which can be compiled into a ready-to-deploy build in approximately 1.5 minutes using 80 servers.
- Testing is conducted on 30 machines, covering all functionalities that are used by more than one percent of users.
- A graph structure is built to visualize the test coverage, ensuring comprehensive testing across different components.
- The tests run on these machines take about 5 minutes to complete.
Deployment Strategies
- PHP code is compiled into a binary file that is approximately 2 GB in size.
- The deployment process involves deploying this binary file to 10,000 servers within 7 minutes using a custom deployment system.
- The deployment starts with rolling out the binary file to gray racks before moving on to production racks.
Continuous Integration and Experimentation
This section focuses on continuous integration practices and experimentation at VKontakte. It emphasizes the importance of testing and monitoring changes in real-time.
Continuous Integration
Introduction to Architecting a Scalable Service
The speaker emphasizes the importance of not designing a complex service architecture alone and encourages collaboration. They mention that only the best projects should be integrated for development.
Importance of Collaboration in Service Architecture
- Collaborative approach is crucial in designing a scalable service architecture.
- Discourages working on complex architectures alone.
- Integration of the best projects leads to successful development.
Opening Access to Speech Recognition Service
The speaker announces the decision to provide access to their speech recognition service. They highlight its usefulness for creating games, services, and generating subtitles for videos and photos. The service is available for free with a file upload limit of 100 minutes.
Features of Speech Recognition Service
- Access to speech recognition service is now open.
- Useful for creating games, services, and generating subtitles.
- Free access with a file upload limit of 100 minutes.
Utilizing Cloud Infrastructure
The speaker mentions that their cloud infrastructure consists of around 1,500 servers. They assure the audience that there are enough resources available for everyone. They recommend attending other presentations by Vitaly Filippov on infrastructure and trying out the speech recognition service before implementing it into their own projects.
Cloud Infrastructure Details
- Their cloud infrastructure comprises approximately 1,500 servers.
- Assures sufficient resources for all attendees.
- Encourages attending Vitaly Filippov's presentations on infrastructure.
- Suggests trying out the speech recognition service before implementation.
Multilingual Speech Recognition
The speaker highlights that their speech recognition system performs exceptionally well with different languages, including Russian. They express gratitude towards feedback from users and encourage them to provide further input or ask questions at VKontakte.
Multilingual Capability of Speech Recognition
- Speech recognition system excels in recognizing various languages.
- Specifically mentions its effectiveness with the Russian language.
- Encourages users to provide feedback and ask questions on VKontakte.
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.