We are being attacked by DDoS, but we do nothing and just attack...

Recently, a fierce offensive and defensive battle has been quietly taking place in the online world.

The protagonist is not the National Security Agency or a hacker organization, but a little-known startup company- TablePlus .

DDoS attackers are eager to try. They swarmed in from all directions, vowing to overwhelm TablePlus' servers with hundreds of millions of requests. Especially the traffic from Germany and the United Kingdom is like a torrential flood, pouring down thousands of miles. In just five days, they initiated more than 80 million download requests in an attempt to exhaust TablePlus's bandwidth and computing resources.

Faced with this massive invasion, what should TablePlus friends do? Will they panic and call Cloudflare for help? Will they be busy blocking IPs and shutting down services?

The answer turned out to be: do nothing, eat and drink when necessary , as if nothing important happened at all. If the CPU hadn't occasionally jumped from 0% to 1%, the server would have suspected itself of suffering from "dissociative identity disorder." TablePlus's servers are all battle-hardened and they don't take this trivial matter seriously.

Where do these bold guys get their confidence from?

This calmness comes from TablePlus' unique choice in architectural design - a single application. Different from the currently popular microservice architecture, TablePlus chooses to concentrate all functions in one service, including API, website front-end, payment, etc. Although this "unified" architecture seems simple, it has advantages that cannot be underestimated.

Others worry about microservices, containers, and orchestration, but TablePlus only needs a binary file and is ready to use.

In order to maximize the performance of a single application, TablePlus has put a lot of effort into technology selection. They chose Golang and Rust, two high-performance languages, as their main development tools . With the excellent concurrent processing capabilities and memory management mechanisms of these two languages, a single TablePlus service can easily handle billions of requests.

But having an excellent language is not enough. TablePlus also strives for excellence in all aspects of software engineering, striving to maximize the performance of single services.

They will index key databases to improve query efficiency;

Separate storage of core database and non-core data (such as logs) to ensure that main business is not affected;

Use Nginx as a reverse proxy to flexibly schedule and distribute requests;

Further improve performance and security with features such as CDN and SSL provided by Cloudflare.

Carefully crafted single services, coupled with an optimized deployment environment, give TablePlus a simple and efficient architecture. In high-concurrency scenarios, this architecture shows amazing performance, even in the face of DDoS attacks.

Of course, no matter how good your skills are, you are still afraid of kitchen knives . No matter how great the service is, you still have to figure out how to use it. When it comes to deployment, TablePlus also pursues simplicity and efficiency. They take full advantage of the features of Golang and Rust, compile the service into a single binary file , and then run it directly on the Linux server. This "dependency-free" deployment method not only simplifies operation and maintenance work, but also maximizes server performance.

TablePlus engineers also use Linux's Systemctl to manage service processes and implement functions such as automatic restart and monitoring, further improving the reliability of the system. Compared with the complex architecture of hundreds of microservices, the deployment of TablePlus is extremely simple.

In this way, TablePlus has raised system performance and efficiency to a new level with its carefully designed single application architecture and minimalist deployment. In the face of DDoS attacks, they responded calmly, demonstrating the power of architectural design.

Containers, VMs, and orchestration are all just fancy tricks in front of TablePlus and are not worth mentioning.

With the single-piece application Zhenjing Protector, TablePlus remains calm in the face of DDoS attacks. Hundreds of millions of requests are coming, and the system services can withstand it; no matter how fierce the traffic is, Cloudflare can withstand it; even if the attacks escalate, the monolithic architecture still stands.

This story tells us that everything has its two sides. A single application may seem simple, but it can also show its power in certain scenarios . The key is to adapt to local conditions according to the characteristics of your own business, exploit your strengths and avoid weaknesses, just like TablePlus, know yourself and the enemy, and you will never be in danger.

In this era of "agility" and "flexibility", TablePlus's "going to the meeting alone" is undoubtedly a bit tragic. But they use their actual actions to tell the world: do a good job in architecture, regardless of whether it is a single entity or microservices; emphasize performance, and everything else is just a cloud .

This story also reminds us that technology is never black and white. Judging the quality of a technology cannot be separated from the specific application scenarios . What suits you is the best. Only by maintaining an open and innovative mind and embracing changes can we find our own position in the ever-changing technological wave.

Microservices are certainly trendy, but monolithic applications also have their own reasons for existing. The key is to find the correct positioning, use strengths and avoid weaknesses, and maximize advantages.

Just like TablePlus, while others are still chasing fashion, they have quietly reached the peak of performance. This kind of courage and wisdom of "going against the trend" is worth thinking and learning for each of us.

Linus took it upon himself to prevent kernel developers from replacing tabs with spaces. His father is one of the few leaders who can write code, his second son is the director of the open source technology department, and his youngest son is an open source core contributor. Robin Li: Natural language will become a new universal programming language. The open source model will fall further and further behind Huawei: It will take 1 year to fully migrate 5,000 commonly used mobile applications to Hongmeng. Java is the language most prone to third-party vulnerabilities. Rich text editor Quill 2.0 has been released with features, reliability and developers. The experience has been greatly improved. Ma Huateng and Zhou Hongyi shook hands to "eliminate grudges." Meta Llama 3 is officially released. Although the open source of Laoxiangji is not the code, the reasons behind it are very heart-warming. Google announced a large-scale restructuring
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4148359/blog/11049955