Jan Koum, an immigrant from Ukraine, was so poor as a teenager that used his saved old Soviet notebooks for school and queued with his mum for food stamps.
Brian Acton lost a small fortune in the dot-com bust and was rejected for jobs at Twitter and Facebook.
Now, the friends behind the hot mobile messaging startup WhatsApp are the newest tech industry billionaires.
Facebook has bought WhatsApp in a stock-and-cash deal worth up to $US19 billion ($A21.13 billion) and gave Koum a seat on the social network's board of directors.
Koum signed the Facebook takeover contract at the unused building where he and his mother once queued for food stamps in the Silicon Valley city of Mountain View, where WhatsApp is located, according to Forbes Magazine.
Koum, who turns 38 on Sunday, has described growing up as a rebellious Jewish child near Kiev and having little when he immigrated to California with his mother the age of 16 just after the Soviet Union's breakup.
His father did not make it to the US, where the family sought to escape anti-Semitism and the oppressive tactics of secret police.
"Jan's childhood made him appreciate communication that was not bugged or taped," Sequoia Capital partner Jim Goetz said in an online post.
"When he arrived in the US as a 16-year-old immigrant living on food stamps, he had the extra incentive of wanting to stay in touch with his family in Russia and the Ukraine."
Koum's mother brought with her a cache of pens and Soviet-issued notebooks to save money on school supplies, according to Forbes magazine.
A self-described trouble-maker at school, Koum had a job sweeping floors in a grocery store. After his mother was diagnosed with cancer, they got by on disability payments, Forbes reported.
Koum learned computer networking from manuals bought from, and eventually returned to, a used book store, said Forbes.
He enrolled in a state university in Silicon Valley and was working on the side with a computer security firm when he met Acton while on assignment at Yahoo in 1997.
Acton was employee number 44 at the Sunnyvale, California-based internet firm and shared a "no-nonsense" attitude with Koum. Within a year, Koum was working as an engineer at Yahoo and the pair were on their way to being close friends.
Koum eventually chose Yahoo over college. When Koum's mother died of cancer in 2000, his mentor Acton stepped in with support.
Acton, meanwhile, reportedly lost millions investing during the famous dot-com boom that ended with an infamous bust.
Acton and Koum left Yahoo in 2007 and took a year off, exploring South America and playing the sport of Ultimate Frisbee, according to Forbes.
They both applied for jobs at Facebook after coming home. Both were rejected. In a Twitter post from 2009, Acton said that an effort to win a job at Twitter failed.
Koum was living off dwindling savings when the iPhone and Apple's online App Store indicated an exciting new frontier was opening.
He tapped into the local Russian immigrant community to pursue his idea of a smartphone messaging service synched to people's contact lists.
Koum enlisted Acton, who was jobless and devoting energy to a less promising startup.
The pair founded WhatsApp, which took its name from a play on the phrase "What's Up?", in 2009.
They devoted themselves to a credo of "No Ads. No Games. No Gimmicks".
The formula led to stunning growth to more than 450 million users, with 50 billion messages handled daily.
In a conference call discussing the acquisition, Facebook chief and founder Mark Zuckerberg described Koum as being a "valuable thought partner" for several years.
WhatsApp is a platform for sending images, video, audio, or text messages for free over the internet using data connections of smartphones.