Rami Essaid gave up a $180,000 salary, a girlfriend and his house when he made a bet that bots would become a problem worthy of his attention.

The Cary native and North Carolina State University graduate was working in Washington D.C. at the time and was a rising star in cloud security at a large company, but he’d always considered himself an entrepreneur. And the bot problem was a big enough opportunity that he was willing to risk it all to solve it.

$2.85 million and 23 employees later, Essaid is on the cusp of raising another round of funding and hiring 10 more engineers to his bot fighting cloud security startup Distil Networks of Arlington, Va. This week, he opened a small development office at HQ Raleigh. Soon, he’ll have a spot in San Francisco.

In July 2013, VentureBeat called Distil “a superhero for the web” after it had successfully blocked a billion bots from invading its clients’ data.

So what’s a bot? And how did Essaid figure out how to stop them?

A bot acts like a person on the Internet but can perform massive amounts of activities at the same time and automatically. For example, they can be programmed to steal data sets and post them publicly around the Internet, or grab web content and share it in unauthorized places, or click on advertisements to inflate the numbers. Bots are a severe problem for nearly every company, but especially for publishers and retailers—Essaid says that more than half of any website’s traffic comes from bots. And the problem got worse in 2011 when Google began to punish people in search results for duplicating content around the web.

Essaid stumbled on it when customers began coming to his former employer to help stop specific types of bot attacks. The company wasn’t equipped to do it, and he couldn’t find anyone else who could. So he called up friends and fellow NCSU computer science grads Engin Akyol and Andrew Stein and asked them to help design a software to find and fight bots, and start a company around it.

“We want to clean up the web,” he says. “We want to stop the bot problem.”

Distil initially raised money from Virginia’s CIT GAP Funds, which required it remain in the state. Durham’s IDEA Fund Partners also contributed. The men then applied to Techstars and joined its former Cloud accelerator in San Antonio in early 2012. There, they refined every aspect of the business and signed on advisors like founders of Rackspace and SoftLayer, early employees at Twitter and Google and Techstars CEO and founder David Cohen.

But during the accelerator, the former employer sued Essaid for violating the terms of his contract by starting a cloud security company. The suit prevented Distil from raising money at Demo Day, and required investment dollars to negotiate a settlement. Other larger cloud security companies threatened to squash Distil. There were times the company’s future was in question.

Essaid likes to share those stories with aspiring entrepreneurs.

“Entrepreneurship has become glamorized to some extent,” he says. “I think it’s important to understand even the success stories are hard.”

Though Distil hasn’t touched even 1 percent of the Internet yet, it has hundreds of customers including more than a dozen Fortune 500s. Focus today is on e-commerce, digital content, data and advertising companies but the bot management and removal tool could be relevant to government, healthcare, banking, and other industries slower to adopt new technologies.

Essaid is happy to have a portion of the growth impacting Raleigh—he’s initially hired four engineers (including Chris Altman and Stephen Atkinson, pictured left and right of Essaid above). Tonight, Distil hosts a Beers and Bots happy hour at HQ Raleigh, and he’s paid a visit to the Startup Factory to mentor its latest cohort. He hopes to connect local startups with the national network afforded him by Techstars.

Essaid still laments that he couldn’t build the company here to begin with—there was plenty of talent but not enough funding to do so.

“Capital is the reason we ended up in Virginia—I really feel like this region needs more capital,” he says. “I raised money from San Francisco, Boulder, New York, and because of that now, we’re also building a stronger presence in California this year. Customers and money are there, why aren’t we?”