How a small site 'icanhazip.com' that only displays the IP addresses of users who accessed it came to receive tens of billions of requests every day and how it was handled



``icanhazip.com '', which was created in 2009, is a service that simply displays your global IP address. ``icanhazip'' is recognized as useful by network operators around the world because it does not contain advertisements or trackers, and tens of billions of requests are sent to ``icanhazip.com'' every day. Major Hayden , the service creator, explains how this situation came about and how to deal with it.

A new future for icanhazip · Major Hayden
https://major.io/p/a-new-future-for-icanhazip/



Mr. Hayden came up with the idea for ``icanhazip'' in the summer of 2009. At the time, Hayden was busy serving customers and deploying cloud infrastructure after cloud computing company

Rackspace Technology acquired hosting service Slicehost. In the midst of customer support, Hayden and his colleagues needed a service that could quickly check the public IP addresses of their numerous backend infrastructures. This is how icanhazip.com was born.

Initially, icanhazip.com basically started as an internal tool for the team, but things changed completely in March 2011 when the overseas media Lifehacker introduced icanhazip.com .

After being featured on Lifehacker, traffic to icanhazip.com skyrocketed, and Hayden's Slicehost instance was flooded with traffic. As a result, Hayden said, ``We realized that icanhazip.com's Apache HTTP Server and Python setup could not withstand long-term load.''



Hayden soon terminated his contract with Slicehost and set up

nginx . At the same time, we also removed the Python script and introduced a configuration that allows nginx to respond to requests independently. Looking back, Hayden says, ``I thought that by setting up nginx, the load on the cloud instances would immediately be reduced and the high load issue would be temporarily resolved.''

By 2015, traffic to icanhazip.com had grown to over 100 million per day. As a result, a situation occurred where the machine could not withstand the load again. Therefore, we moved our server to Hetzner , a major German cloud service. However, Mr. Hayden said, ``Although Hetzner's server usage fees were not expensive, I was still paying $200 (about 30,000 yen) a month to maintain the site. com was not making a profit, so maintenance costs were rising,' he recalls.

Mr. Hayden, who was worried about the cost of maintaining the site, obtained a sponsorship contract from Equinix Metal , which provides cloud services, and decided to significantly reduce the cost of maintaining the site as an alternative to deploying icanhazip.com on one of Equinix Metal's servers. succeeded. Since then, icanhazip.com has received over 500 million requests per day. Hayden installed a second server, but the overload situation still persisted. Mr. Hayden, who wanted to avoid introducing any more servers, confirmed the internals of the site's kernel and made various improvements to icanhazip.com.



However, the number of requests for icanhazip.com shows no signs of stopping, exceeding 1 billion requests per day. When Mr. Hayden, who was out of control, asked for help on X (formerly Twitter), a representative from

Cloudflare , which provides cloud computing services, extended a helping hand. Following instructions from Cloudflare personnel, we configured traffic filtering to reduce the impact of attacks such as SYN flood attacks from malicious clients.

This prompted Hayden to introduce Cloudflare Workers , a serverless service that runs scripts on edge servers. Thanks to Cloudflare's promise to provide Cloudflare Workers services for free, Hayden was able to further expand icanhazip.com.

In 2021, it now takes just 24 hours to reach the amount of traffic that previously took a month. icanhazip.com receives between 30 billion and 35 billion requests per day, with the majority of that traffic coming from multiple networks in China. However, Cloudflare continued to process traffic, so the site's response time remained largely unchanged. Mr. Hayden expressed his gratitude, saying, ``I'm really grateful.''

However, icanhazip.com suffered from indirect damage from malware that ``accessed icanhazip.com remotely to check whether it was infected with malware.'' Many companies, state governments, and federal agencies were sympathetic to the attack, but some state chief information security officers accused Hayden of being 'involved in infecting users with malware.' He reportedly threatened to consider legal action.



Mr. Hayden, who was damaged and slandered by malware, said, ``My passion for icanhazip.com is getting smaller day by day.I have completely lost the fun.'' Hayden also revealed that he had received funding of less than $5,000 (approximately 750,000 yen) from various companies, saying, ``This money is not what I was looking for. We wanted them to run it and help the information security industry block these malicious acts.'

Still, Hayden says he plans to keep icanhazip.com alive as Cloudflare has come up with ways to handle the traffic load and prevent malicious traffic. “Being able to work collaboratively with other companies was a big turning point for me,” Hayden reflected.

◆Forum now open
A forum related to this article has been set up on the GIGAZINE official Discord server . Anyone can write freely, so please feel free to comment! If you do not have a Discord account, please create one by referring to the article explaining how to create an account!

• Discord | 'When do you want to check your IP address?' | GIGAZINE
https://discord.com/channels/1037961069903216680/1222839209325498388

in Software,   Web Service, Posted by log1r_ut