鸟窝

Implement traceroute tool in Go

Original link: https://colobu.com/2023/05/03/write-the-traceroute-tool-in-Go/ traceroute is a utility for diagnosing network connectivity problems by determining the network path and network latency between two computers. The traceroute tool is widely used in network engineering, system management and network security. The traceroute tool also uses ICMP, an Internet control message protocol, which allows users to detect the number …

Implement traceroute tool in Go Read More »

“implementing the ping tool”

Original link: https://colobu.com/2023/04/26/write-the-ping-tool-in-Go/ Ping is a network tool that is widely used to test the quality and stability of network connections. When we want to know if our computer is able to communicate with other devices or servers, ping is our best friend. When we want to detect the connectivity and network quality between networks, …

“implementing the ping tool” Read More »

High-performance batch read and write network packets

Original link: https://colobu.com/2023/04/22/batch-read-and-write-udp-packets-in-Go/ Although the network protocol stack provides a wealth of functions, allowing us to easily realize network data exchange, sometimes we are not so satisfied with the performance of the protocol stack. In the previous articles, I also introduced efficient processing through XDP and other technologies. The way of network data, but after …

High-performance batch read and write network packets Read More »

Scan the IP address of the whole network as fast as lightning

Original link: https://colobu.com/2023/03/19/a-featured-fsm/scan-all-IP-addresses-of-mainland-fastly-like-lightning/ A new Go programming series is opened, mainly talking about advanced programming techniques of Go language. I hope to form a series like “Go Concurrent Programming Guide”, and don’t stop updating. In the previous nearly two decades of programming development, network programming was involved, mainly using the network library of the standard …

Scan the IP address of the whole network as fast as lightning Read More »

Scan the IP address of the whole network as fast as lightning

Original link: https://colobu.com/2023/03/19/scan-all-IP-addresses-of-mainland-fastly-like-lightning/ A new Go programming series is opened, mainly talking about advanced programming techniques of Go language. I hope to form a series like “Go Concurrent Programming Guide”, and don’t stop updating. In the previous nearly two decades of programming development, network programming was involved, mainly using the network library of the standard …

Scan the IP address of the whole network as fast as lightning Read More »

“Without microservices, Shopify’s single program actually supports 1.27 million/second requests?”

Original link: https://colobu.com/2022/12/04/Shopify-monolith-served-1-27-Million-requests-per-second-during-Black-Friday/ On this year’s Black Silk Friday abroad (similar to the domestic Double Eleven shopping season), Shopify has achieved outstanding results, and their engineering team gave the following technical data: MySQL: 14 million/second QPS (peak value) Metrics: 20 billion indicators/minute, 27G/second indicator data Service peak: 1.27 million/second service calls, 75.98 million times/minute 32 …

“Without microservices, Shopify’s single program actually supports 1.27 million/second requests?” Read More »

How to optimize? I mean Go program

Original link: https://colobu.com/2022/10/17/a-first-look-at-arena/ Go language is a very easy to use language, and the optimization routines of Go programs are basically unknown to everyone. If you have the heart, you can search for many Go program optimization skills on the Internet. Some articles may only introduce Several optimization points, some articles from CPU architecture to …

How to optimize? I mean Go program Read More »

Rust Concurrent Programming Practical Course

Original link: https://colobu.com/2022/10/13/concurrency-programming-via-rust/ Rust is becoming more and more widely used, especially in the field of system programming that pursues performance, and has recently officially entered the mainline of the Linux kernel and is expected to be officially used in version 6.1. Although Rust has a unique design concept and excellent performance, it is not …

Rust Concurrent Programming Practical Course Read More »

After more than ten years, the most fallible Go syntax is finally about to change

Original link: https://colobu.com/2022/10/04/redefining-for-loop-variable-semantics/ What is your most error-prone syntax in Go? Many people may have different answers, but one of the most common is the use of variables in for loops. Even developers on the Go team, I’ve seen code they commit make this kind of mistake, not to mention other Go developers, like this …

After more than ten years, the most fallible Go syntax is finally about to change Read More »

Inside the Go CPU profiler

Original link: https://colobu.com/2022/09/29/Inside-the-Go-CPU-profiler/ Original text: Inside the Go CPU profiler , by Sümer Cip. I’m guessing Felix Geisendörfer will comment, and sure enough. Go is one of those languages ​​that comes with its own profiler. Its runtime includes a powerful variety of profilers in their own right. Other languages, such as Ruby, Python, and Node.js, …

Inside the Go CPU profiler Read More »

Many years old driver, facing these Go concurrency problems, hesitant

Original link: https://colobu.com/2022/09/12/go-synchronization-is-hard/ Go has always been known for its simplicity and ease of learning. I have also met students who say that it takes only half a day to master the Go language, and two or three years of Go development experience is called an expert. If you want to compare programming languages ​​such …

Many years old driver, facing these Go concurrency problems, hesitant Read More »

With each passing day, this efficient transformation has changed again in Go 1.20

Original link: https://colobu.com/2022/09/06/string-byte-convertion/ In the development of Go 1.19, string.SliceHeader and string.StringHeader experienced a life-and-death struggle. These two types were once marked as deprecated ( deprecated ), but these two types are often used in slice of byte and string to efficiently interact with each other. In the transition scenario, if it is marked as …

With each passing day, this efficient transformation has changed again in Go 1.20 Read More »

A thread-safe generic support map library

Original link: https://colobu.com/2022/09/04/a-thread-safe-and-generic-supported-map/ orcaman/concurrent-map is a very efficient thread-safe map library, as its documentation says, the standard library sync.Map is more suitable for append-only scenarios, or scenarios with less write-heavy reads, if For multi-read and multi-write scenarios, concurrent-map may be more advantageous. It reduces the granularity of locks through sharding, thereby improving performance. At the …

A thread-safe generic support map library Read More »