Sriracha goes with everything, including maple sausage.

Sriracha, the popular Thai-style hot sauce made by California's Huy Fong Foods, is everywhere right now, from the tables in Asian diners across the country to the menu at PF Chang's, Pei Wei, and even Subway. Sriracha has its own food festival, a new documentary, two cookbooks and a fan base so hardcore that Sriracha tattoos are a thing. Sales last year were $60 million.

The company's current issues with the city of Irwindale over peppery emissions from its new processing plant have made national news and prompted Philadelphia's mayor to offer the company a new home if Sriracha turns out to be too hot for California to handle. From the Huffington Post to Tumblr to Twitter, Sriracha is quite literally a hot topic. And none of that heat is coming from company social media accounts or publicists.

How did a niche product made by a small private company with no sales staff and no advertising budget manage to become a social media superstar? Sriracha's recipe for success is a smart blend of old-school business basics with a dash of serendipity.

An overnight success, 30 years in the making

While Sriracha seems new, it's been around since 1980, and its formula for success starts with a solid base: Sriracha is made with fresh peppers, which cost more and must be processed faster than the dried peppers most sauce makers use. To make the fresh approach workable, Huy Fong founder David Tran has worked with the same farm for 20 years.

His processing plants over the years—including the new one under scrutiny in Irwindale—were all chosen for their proximity to the farm, cutting transport costs and allowing same-day processing during the hectic 10-week pepper harvest season. The result is a tasty and low-cost product that, importantly, needs no refrigeration.

Sriracha's fridge-free aspect made it a natural for the tables of Vietnamese diners around LA, and from there the sauce built up a fan base that went far beyond the SoCal Asian community. Restaurant customers wanted Sriracha for their home kitchens, chefs and foodies looking for the next new flavor discovered it, and Sriracha found its way into venues as diverse as Wal-Mart, which started carrying it in 2003, and Momofuku Noodle Bar in Manhattan.

Demand for Sriracha has always outpaced production, which is limited by the pepper harvest, so there was never any need to advertise. Rather than push to open up new markets, Tran outsourced distribution, ignored social media altogether, and focused on his product. For years, Sriracha remained the open-secret sauce of Asian restaurants, adventurous home cooks, and savvy chefs like Momofuku's David Chang, all the while winning new converts with its sweet fire.

Lighting the fire with Oatmeal

The spark for the Sriracha media wildfire was lit in late 2009, when Bon Appetit named Sriracha its Ingredient of the Year and introduced it to a wider audience of novelty-seeking food lovers. In January 2011, Randy Clemens' popular Sriracha Cookbook hit the market. Two months later, The Oatmeal added major fuel to the Sriracha fire.

The Oatmeal, a site run by cartoonist and author Matthew Inman, offers pithy and profane insights on everything from the horrors of customer service helplines to the predatory virtues of the mantis shrimp. In March 2011, Inman published his literal love letter to Sriracha, praising both its ability to salvage subpar takeout and its character-building qualities.

"This is a Sriracha burn... What you're feeling is premature enlightenment." The post earned more than 8,000 Twitter mentions and 303,000 likes on Facebook, and Inman became Sriracha's biggest social-media fan and unofficial promoter. The poster version of the Sriracha comic, along with other artwork, clothing, and Sriracha-product gift packs, are hot sellers in The Oatmeal Shop.

Inman, whom CNN contacted about the Irwindale factory-fume story, also runs an unofficial Sriracha fan page on Facebook with more than 74,000 followers. He and other fans share links to recipes and some of the endless new products featuring Sriracha—Jack Link's jerky, candy canes, rooster-logo T-shirts, and more. And Inman's still promoting new Sriracha items, like those candy canes, on The Oatmeal, which has 1.7 million Facebook fans and 400,000 Twitter followers.

That's a huge audience to reach for free, and it's a responsive group: The Oatmeal's 2012 comic about scientist Nikola Tesla led to an Indiegogo campaign that raised $1.3 million to save Tesla's former lab in Shoreham, N.Y., and turn it into a museum.

Meanwhile, foodies are putting Sriracha in everything. Search Google for Sriracha plus virtually any dish you can think of and you'll find recipes: ceviche, peanut butter cookies, latkes, jam, and smoothies are just the tip of the fiery iceberg. Clemens, the cookbook author, recently published his second book of Sriracha recipes, this time focusing on vegan and gluten-free dishes. Perhaps Sriracha's greatest virtue is its mind-blowing versatility.

Of course, Huy Fong's 2010 move to Irwindale predates Clemens' cookbooks and all the love from The Oatmeal. And it was almost certainly in the works before Bon Appetit's endorsement. The media attention is simply the spicy garnish on a good product delivered at a mass-market price. And even if Sriracha turns out to be social media's flavor of the month, all that brand awareness hasn't cost the company a dime.