After Fastly (FSLY -3.82%) posted its second-quarter numbers on Aug. 4, the edge cloud services provider's  stock plummeted to a 52-week low. Its revenue had risen 14% year over year to $85 million, missing estimates by nearly $1 million and decelerating from its 35% growth in the first quarter.

Fastly's net loss also widened from $14 million to $58 million. On a non-GAAP basis, its net loss widened from $2 million to $17 million, or $0.15 per share -- which still beat analysts' expectations by three cents.

Fastly expects its revenue to grow between 15% and 20% year over year in the third quarter, well below Wall Street's expectations for 38% growth. For the full year, it expects its revenue to rise 17% to 20%, compared to the consensus expectations for 31% growth. Let's see why Fastly broadly missed analysts' expectations -- and if its stock is still worth buying as the bulls rush for the exits.

A smartphone user views a wide range of videos.

Image source: Getty Images.

When your core product stops working...

Most websites and apps are hosted on "origin" servers, but their physical distance to end users limits their maximum speeds. To address those limitations and reduce the strain on origin servers, companies often turn to "edge" servers, which host cached copies of the original content closer to the user.

Fastly's platform, which runs on edge servers, bundles together a content delivery network (CDN) for delivering digital media, cybersecurity services, bot blockers, and other tools. Simply put, Fastly accelerates the delivery of a website or app's content to the end user over a secure connection.

Fastly's customers -- which include Amazon, Shopify, the digital payments company Stripe, and the news giant Gannett -- need its platform to operate reliably around the clock. But in early June, a massive outage at Fastly took down hundreds of websites and services for nearly an hour.

In Fastly's second-quarter shareholder letter, CEO Joshua Bixby admitted the disaster "will have an impact on our Q3 and full year outlook." Bixby noted there were "a couple of customers, one of them being a top 10 customer, that have yet to return their traffic to the platform" after the outage took place -- and several other customers postponed their new project launches.

Fastly issued credits to its customers after the outage, but that move will exacerbate its near-term slowdown in revenue growth and compress its non-GAAP gross margin, which already declined 410 basis points year over year to 57.6% during the quarter. Meanwhile, Fastly's larger CDN rival Cloudflare (NET -0.79%) -- which suffered a comparatively minor outage in June -- could pull away some of its existing and potential customers.

Silver linings

Fastly's self-inflicted wounds look terrible, but there were still a few bright spots in its earnings report. Its customer count increased 32% year over year and 5% quarter over quarter to 2,581.

Its number of enterprise customers who spend at least $100,000 over a trailing 12-month period grew 34% year over year and 3% sequentially to 408. That expansion was boosted by its acquisition of Signal Sciences, which closed last October and strengthened its web security platform.

However, Fastly's enterprise customers only spent an average of $702,000 during the second quarter -- compared to $705,000 in the first quarter and $716,000 a year ago. Fastly blamed that slowdown on lower enterprise spending on Signal's services, which lowered the enterprise average.

Fastly's dollar-based net expansion rate (DBNER), which measures its year-over-year revenue growth per existing customer over the past 12 months, initially seems healthy at 126%. But that still represents a decline from a DBNER of 139% in the previous quarter and 137% a year ago.

Fastly's net retention rate of 93%, which fell sharply from 107% in the first quarter and 138% a year ago, also clearly reflects its loss of its "top ten" customer and post-outage challenges. These mixed numbers indicate Fastly's "land and expand" strategy, in which it signs customers onto one service to cross-sell additional ones, is faltering.

Beware this struggling company

If Fastly were a market leader in the CDN market, and it generated stable profits with a lower valuation, I'd be more forgiving of its recent blunders. But Fastly remains far behind Cloudflare in the CDN race, its losses are widening, and it still trades at about 12 times this year's sales.

Fastly is also shouldering $931 million in long-term debt and more than $1.1 billion in total liabilities -- mainly due to a convertible notes offering earlier this year -- so it remains to be seen if its new CFO Ron Kisling, who previously held the same post at Fitbit, will continue raising cash with debt offerings or find fresh ways to narrow its losses.

Kisling's appointment has sparked some speculation that Fastly might sell itself to a bigger company -- but I wouldn't buy this battered stock on takeover hopes alone. Instead, investors should consider paying a higher premium for Cloudflare, which remains a better overall choice than Fastly in the CDN market.