On the Money

How to get fired and become a tech entrepreneur: AppNexus CEO

Lessons in losing

Inventing a new way to make money on the Internet, and competing with behemoths like Google didn't come easily to AppNexus founder and CEO Brian O'Kelley.

He had to get fired—more than once.

"I've gotten fired a few times, and every time it was the same reason," O'Kelley told CNBC. "I saw this huge incredible opportunity to do something that would change the world and the people I worked for said, 'hey, that's not realistic.'"

O'Kelley's rise to a billion-dollar valuation came with a few bumps. He was fired as Chief Technology Officer at Right Media, which was automating advertising networks, the day after the company was sold to Yahoo for $850 million in 2007.

But the AppNexus chief is in fairly good company. The late Steve Jobs was once famously fired from Apple, the company he eventually turned into a global brand with his knack for technology innovation.

O'Kelley now works for himself, with some taking to calling him the king of ad technology at one of New York's most valuable start-ups.

"I feel like I have to live every day at work as if it could be my last," O'Kelley said. "I have to take the risks that allow us to potentially fail because it's the only way to learn."

Eric Piermont | AFP | Getty Images

AppNexus transacts 30 billion ad impressions every day, and the company was recently valued at more than $1 billion.

"I've always had this belief that we could do incredible things," said the long-time entrepreneur. O'Kelley is also credited with inventing exchanges that auction online banner and border ads to the highest bidder.

"Advertising is the life blood of the internet," said O'Kelley. "Making content more valuable makes the internet a better place," by enabling advertisers to bid on buying the best possible spots to reach potential customers, he said. Ideally, the system links consumers to ads more relevant to their surfing habits.

On the Money airs on CNBC Sundays at 7:30 pm ET