Markets
NET

Cloudflare Is Taking On Amazon by Harnessing the Edge

Cloudflare (NYSE: NET) is best known for speeding up its customers' applications and protecting them from hackers and attacks. The company's global network sits between a website visitor and a customer's infrastructure, protecting that infrastructure from being overloaded with malicious traffic and caching content close to the user.

Cloud computing has been a revolution for developers, allowing virtual servers and storage to be quickly provisioned and scaled with ease. If a developer wants to build an application, they can go to Amazon (NASDAQ: AMZN) Web Services and have infrastructure ready to go in a few minutes.

The downside of this approach is that code and data are executed and stored in one place. AWS and other major cloud providers are split into regions, and your application is generally going to live in one of those regions. If someone visits your website from California and you're using one of AWS's regions on the East Coast, requests are going to be flying across the country. It's a fast process, but it's not instantaneous.

The Cloudflare logo.

Image source: Cloudflare.

Cloudflare's core products help with this situation by allowing some of those requests to be served from cached data at one of its more than 200 locations around the world. Bringing the data closer to the user reduces the time it takes to retrieve that data, speeding up website load times and providing a better user experience. This is edge computing in a nutshell.

Becoming a full-fledged development platform

While Cloudflare works great as a middleman, the company has greater ambitions. Over the past few years, Cloudflare has been building out a set of products that make it capable of eliminating cloud giants like AWS from the picture entirely. The company's developer platform has some shortcomings and isn't for everyone, but it's a powerful alternative to the traditional cloud computing model.

Cloudflare Pages is the first piece of Cloudflare's solution. Pages allows developers to host static websites on Cloudflare's global network. It works the same as other serverless platforms like Netlify. A developer pushes a change to their codebase to GitHub, then Cloudflare picks up that change, rebuilds the website, and deploys it within a couple of minutes.

A static website on its own can't do much other than display fixed content. The second part of Cloudflare's solution, Cloudflare Workers, tackles making those websites dynamic. Workers are pieces of code that live and run in all Cloudflare's data centers. Instead of a virtual server handling requests from one place, a Cloudflare Worker runs on whatever data center is closest to the user. Putting this code on the edge makes response times lighting fast.

The third part of Cloudflare's solution is storage. Typically, an application needs a database of some kind to store user data. Cloudflare doesn't offer a database of its own, but it gets close with Workers KV and Durable Objects. These storage products don't support complex queries like MongoDB, but they work well for basic use cases.

Beyond databases, applications usually need to store images, videos, and other big pieces of content. Amazon S3 is a popular way to do that, but costs can quickly get out of control. Amazon charges for storage and bandwidth, so serving images to millions of website visitors can really run up your cloud computing bill.

Cloudflare's latest storage product, R2, aims to replace Amazon S3 at a much lower cost. R2 will only charge for storage when it comes out of beta. For S3 users that eat up a lot of bandwidth, switching to R2 can dramatically cut costs.

Cloudflare now offers developers most of what they need to build a full application. They can host their websites, add a serverless backend with Workers, and persist and store data with Cloudflare's storage products. And because all of this is happening close to the user, performance is impressive.

Cloudflare's approach does have some limitations. The biggest one may be the inability of Workers to easily connect to popular databases like MongoDB. Many database connections use a protocol that Workers don't currently support, so something that's dead simple on other cloud platforms is impossible on Cloudflare without putting a middleman between a Worker and the database.

Despite the limitations, Cloudflare is a compelling option for developers. The company's platform can lower costs compared to AWS, and it can provide extreme performance thanks to its many locations around the world. Pricing is also much simpler on Cloudflare compared to the Kafkaesque pricing calculators that are part of any AWS user's life.

AWS has its own edge computing products, but the platform is geared toward the traditional cloud computing model. Cloudflare, in contrast, is an edge-first company. While Cloudflare doesn't offer anywhere close to the number of features offered by AWS, Amazon should certainly be worried as more developers discover the benefits of moving compute and storage to the edge.

10 stocks we like better than Cloudflare, Inc.
When our award-winning analyst team has a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*

They just revealed what they believe are the ten best stocks for investors to buy right now... and Cloudflare, Inc. wasn't one of them! That's right -- they think these 10 stocks are even better buys.

See the 10 stocks

*Stock Advisor returns as of September 17, 2021

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Timothy Green has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon, Cloudflare, Inc., and MongoDB. The Motley Fool recommends the following options: long January 2022 $1,920 calls on Amazon and short January 2022 $1,940 calls on Amazon. The Motley Fool has a disclosure policy.

The views and opinions expressed herein are the views and opinions of the author and do not necessarily reflect those of Nasdaq, Inc.

In This Story

NET

Latest Markets Videos

The Motley Fool

Founded in 1993 in Alexandria, VA., by brothers David and Tom Gardner, The Motley Fool is a multimedia financial-services company dedicated to building the world's greatest investment community. Reaching millions of people each month through its website, books, newspaper column, radio show, television appearances, and subscription newsletter services, The Motley Fool champions shareholder values and advocates tirelessly for the individual investor. The company's name was taken from Shakespeare, whose wise fools both instructed and amused, and could speak the truth to the king -- without getting their heads lopped off.

Learn More