While generative artificial intelligence (AI) seems to be taking the world by storm, there's more to AI than generating text, images, and other content. Yes, it's cool that ChatGPT can answer complex questions, write long-form text, and produce functional code. But just as impressive, if not nearly as visible, is the work other forms of AI are doing behind the scenes.

Cloudflare (NET 1.44%), first and foremost, is a content delivery network that protects its customers' servers from malicious traffic and attacks. The company's global edge network sits in between users and the content they're requesting. When a request comes in, Cloudflare must determine if the request is legitimate, and it must do so as quickly as possible. Tack on too many additional milliseconds to a response time, and the end user will notice.

AI at an incredible scale

Cloudflare serves more than 46 million HTTP requests per second, a number that can jump to 63 million HTTP requests per second during peak times. For every single request, Cloudflare must make sure it's not letting bad traffic through. That's on top of running all the other features a customer has enabled, including running custom code through the Workers platform.

Cloudflare is supposed to speed up websites, so none of this can take very long. But to accurately detect threats, Cloudflare must look at not only the request itself but also traffic patterns and other data. Cloudflare doesn't want to block traffic on Black Friday, but it also doesn't want to let a distributed denial of service attack through.

This is where machine learning, a form of AI, comes in. Cloudflare runs multiple machine-learning models for every single request. The company has been able to scale its platform to handle tens of millions of requests per second partly because of its success in making these AI models run extremely fast.

One reason why Cloudflare is so widely used is its rapid pace of innovation. The company didn't just sprinkle some AI on to its platform and call it a day. Instead, it's constantly working to improve its AI systems and shave milliseconds off request times. A recent update to its AI architecture, which the company detailed in a blog post, reduced the average processing latency for HTTP requests by 12.5%. For Cloudflare's customers, that means noticeably snappier performance.

Cloudflare's success in scaling its AI systems is also creating a new growth opportunity: Allowing customers to run their own AI models on Cloudflare's platform. Through its Constellation product, which is currently in private beta, customers can deploy pre-trained AI models and perform inference tasks on top of the Workers platform. This means that something like image classification, text translation, text-to-speech, and other AI tasks can be run directly on Cloudflare's edge network.

Immense optionality

One of the best things about Cloudflare is the optionality of its platform. Having a vast network of edge servers around the world opens a lot of possibilities. The company's Workers product, which allows customers to run custom code on every request, is only possible because of the effort Cloudflare put into making its platform incredibly fast. Workers, in turn, provides the foundation for new products like Constellation.

For an investor, this optionality is the reason to pay a lofty premium for Cloudflare stock. The company is valued at roughly $21 billion, or about 16 times annual revenue guidance. That's a high price to pay without a doubt. However, Cloudflare's ability to leverage its platform to launch new products and services has expanded its total addressable market from $32 billion in 2018 to $146 billion today. This number should continue to rise as the company continually launches new products like Constellation.

Cloudflare may not seem like an AI stock, but the company runs AI workloads at a scale that may very well be unmatched. The company's work deploying AI models for its own systems is now allowing the company to offer the same ability to its customers. It's this culture of innovation that makes Cloudflare a top stock, despite its pricey valuation.