Telegram Group & Telegram Channel
👣 Как одной Go‑службе легко выдержать 200000 RPS на одной машине

В свежей статье Никиты Бурова разбирается практический кейс: без шардирования, без десятков реплик и без магии облака — всего за счёт правильных оптимизаций Go‑сервис на одном MacBook Pro M3 достигает 200000 запросов в секунду с медианным P50 < 1 мс. Вот главные приёмы:

1⃣ Сводим работу «горячего» пути к минимуму
- Статический преподготовленный фид — из памяти, без БД/API.
- Ноль аллокаций — никаких new/make в горячем пути.

2⃣ net/http → fasthttp
- Быстрее TCP, буферы, заголовки.
- ×8–10 прирост RPS.

3⃣ Pool объектов + явный сброс
- sync.Pool для структур.
- Отказ от defer.

4⃣ Tюнинг GOMAXPROCS + GOGC
- GOMAXPROCS= ядра.
- GOGC=200–300.

5⃣ Профилирование pprof benchstat

Результат: один инстанс держит 200000 RPS с P50 < 1мс и P99 < 2мс.

🔗 Полная статья: https://medium.com/@nikitaburov/how-to-easily-handle-200k-rps-with-golang-8b62967a01dd
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/golang_books/960
Create:
Last Update:

👣 Как одной Go‑службе легко выдержать 200000 RPS на одной машине

В свежей статье Никиты Бурова разбирается практический кейс: без шардирования, без десятков реплик и без магии облака — всего за счёт правильных оптимизаций Go‑сервис на одном MacBook Pro M3 достигает 200000 запросов в секунду с медианным P50 < 1 мс. Вот главные приёмы:

1⃣ Сводим работу «горячего» пути к минимуму
- Статический преподготовленный фид — из памяти, без БД/API.
- Ноль аллокаций — никаких new/make в горячем пути.

2⃣ net/http → fasthttp
- Быстрее TCP, буферы, заголовки.
- ×8–10 прирост RPS.

3⃣ Pool объектов + явный сброс
- sync.Pool для структур.
- Отказ от defer.

4⃣ Tюнинг GOMAXPROCS + GOGC
- GOMAXPROCS= ядра.
- GOGC=200–300.

5⃣ Профилирование pprof benchstat

Результат: один инстанс держит 200000 RPS с P50 < 1мс и P99 < 2мс.

🔗 Полная статья: https://medium.com/@nikitaburov/how-to-easily-handle-200k-rps-with-golang-8b62967a01dd

BY Golang Books




Share with your friend now:
tg-me.com/golang_books/960

View MORE
Open in Telegram


Golang Books Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Work?

Bitcoin is built on a distributed digital record called a blockchain. As the name implies, blockchain is a linked body of data, made up of units called blocks that contain information about each and every transaction, including date and time, total value, buyer and seller, and a unique identifying code for each exchange. Entries are strung together in chronological order, creating a digital chain of blocks. “Once a block is added to the blockchain, it becomes accessible to anyone who wishes to view it, acting as a public ledger of cryptocurrency transactions,” says Stacey Harris, consultant for Pelicoin, a network of cryptocurrency ATMs. Blockchain is decentralized, which means it’s not controlled by any one organization. “It’s like a Google Doc that anyone can work on,” says Buchi Okoro, CEO and co-founder of African cryptocurrency exchange Quidax. “Nobody owns it, but anyone who has a link can contribute to it. And as different people update it, your copy also gets updated.”

What is Secret Chats of Telegram

Secret Chats are one of the service’s additional security features; it allows messages to be sent with client-to-client encryption. This setup means that, unlike regular messages, these secret messages can only be accessed from the device’s that initiated and accepted the chat. Additionally, Telegram notes that secret chats leave no trace on the company’s services and offer a self-destruct timer.

Golang Books from es


Telegram Golang Books
FROM USA