🚀 Хочешь масштабировать своё API по горизонтали? Без балансировщика нагрузки не обойтись.
Вот как быстро собрать свой на .NET с помощью YARP (Yet Another Reverse Proxy):
3 простых шага: 1. Установи библиотеку YARP (`Microsoft.ReverseProxy`) 2. Настрой YARP в Program.cs и appsettings.json 3. Укажи пути к downstream-сервисам
После этого твой прокси уже готов к работе — будет распределять трафик между сервисами.
Но это только начало. YARP мощный и расширяемый. Он поддерживает разные политики балансировки нагрузки прямо "из коробки":
▪Random — случайный выбор ▪RoundRobin — по кругу ▪LeastRequests — к тому, у кого меньше всего запросов ▪FirstAlphabetical — по алфавиту ▪PowerOfTwoChoices — выбери лучший из двух случайных (дефолт)
Автор статьи применил YARP для масштабирования нескольких приложений и делится опытом в полном гайде:
🚀 Хочешь масштабировать своё API по горизонтали? Без балансировщика нагрузки не обойтись.
Вот как быстро собрать свой на .NET с помощью YARP (Yet Another Reverse Proxy):
3 простых шага: 1. Установи библиотеку YARP (`Microsoft.ReverseProxy`) 2. Настрой YARP в Program.cs и appsettings.json 3. Укажи пути к downstream-сервисам
После этого твой прокси уже готов к работе — будет распределять трафик между сервисами.
Но это только начало. YARP мощный и расширяемый. Он поддерживает разные политики балансировки нагрузки прямо "из коробки":
▪Random — случайный выбор ▪RoundRobin — по кругу ▪LeastRequests — к тому, у кого меньше всего запросов ▪FirstAlphabetical — по алфавиту ▪PowerOfTwoChoices — выбери лучший из двух случайных (дефолт)
Автор статьи применил YARP для масштабирования нескольких приложений и делится опытом в полном гайде:
The creator of the channel becomes its administrator by default. If you need help managing your channel, you can add more administrators from your subscriber base. You can provide each admin with limited or full rights to manage the channel. For example, you can allow an administrator to publish and edit content while withholding the right to add new subscribers. So far, more than a dozen different members have contributed to the group, posting voice notes of themselves screaming, yelling, groaning, and wailing in various pitches and rhythms. Matt Hussey, editorial director of NEAR Protocol (and former editor-in-chief of Decrypt) responded to the news of the Telegram group with “#meIRL.” In the “Bear Market Screaming Therapy Group” on Telegram, members are only allowed to post voice notes of themselves screaming. Anything else will result in an instant ban from the group, which currently has about 75 members. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content.
from us