At Google's headquarters in Mountain View, software engineer Brandon S. is known as "the truck guy".
The 25-year-old lives in a 128 sq ft box truck, which he bought for US$10,000 (S$13,800) and parks outside Google's headquarters.
Brandon, who does not want his full name published, keeps a single bed and pine wood cabinet inside a grey metal container he has lined with insulated sheets using hot glue.
He can afford an apartment in the San Francisco Bay Area, but does not see the point in spending an exorbitant sum on rent.
When he moved to San Francisco to intern for Google in 2014, he was paying US$2,000 a month for a tiny apartment he only slept in, because the working hours and commute left him with little time at home.
Brandon eats and does his laundry for free at Google, and has access to a 24-hour gym where he showers. The only expense for his abode is the monthly insurance, and a US$30 parking ticket because he left his truck on the street too long.
"I realised I could get a parking ticket every single night for every day of the year and it would still be cheaper," he said.
The whole system is just extremely unsustainable and I don't want to be a part of it.
BRANDON, a 25-year-old who lives in a box truck he bought for US$10,000.
I think people have become very infatuated by these high grossing salaries in the Bay Area that they don't realise the cost of living here and how they are not really going to be taking home much money in the end.
MR CHRIS BOLTE, Hiring data firm Paysa's chief executive.
Silicon Valley has some of the highest housing and living expenses in the world thanks to its booming tech industry. Between 2010 and 2015, tech jobs grew 24.5 per cent, leading to an influx of talent to the Bay Area.
But housing has grown only 2.6 per cent over the same period, sending prices shooting through the roof. Real estate database firm Zillow estimates a single square foot in the city costs US$495 today; the average rent is triple the United States average at US$3,390 a month.
High home prices have caused tech workers to spread out of the city to find cheaper housing, prolonging their commute and driving up prices in neighbouring suburbs.
The irony of San Francisco's success is that while its tech workers make more money than their colleagues in the rest of the country, the ballooning costs as a result of their work are also slowly pricing them out of Silicon Valley.
Hiring data firm Paysa, based in Palo Alto, released a study which found that the average tech worker in San Francisco makes about US$144,390 a year, but takes home only a third of that because it costs about US$90,000 to live in the city.
When Paysa compared the return on investment of tech salaries to the cost of living in the Bay Area and other US cities, San Francisco ranked 20th for overall value.
"I think people have become very infatuated by these high grossing salaries in the Bay Area that they don't realise the cost of living here and how they are not really going to be taking home much money in the end," said Paysa chief executive Chris Bolte.
Seattle ranked as the best city for tech workers to be in, with Paysa estimating that although salaries there are not as high as in San Francisco, the lower cost of living would allow them to take home 41 per cent of their salaries. Cities ranked ahead of San Francisco include Atlanta, Austin, Denver, Philadelphia and Boston.
"There seems to be movement from Silicon Valley to these cities," said Mr Bolte. "There's plenty of jobs and you can have a better lifestyle and savings than in San Francisco."
Data scientist Patrick Harrington can attest to that. In 2015, he and his wife decided to move after growing tired of the high expenses, long commutes and realising they could not find nearby affordable childcare for their newborn son.
Mr Harrington now lives in Boulder, Colorado, where he bought a home that is just a 3km bicycle ride from his office. He said: "San Francisco will always be the centre for innovation and social capital, but it is such an expensive place even for our jobs which were good jobs. And we decided enough was enough."
A March poll by the Bay Area Council found 46 per cent of young San Franciscans, most of whom are in the tech sector, wanted to leave the area, citing high housing and living costs, and terrible traffic.
Tech giants seem to recognise the advantage of having offices in places with lower living expenses to attract and keep talent.
In March, Web applications firm Zapier offered staff US$10,000 in bonuses to leave their San Francisco office as part of a "de-location" package. Google has broken ground for a new office, almost the same size as its Mountain View campus, while Facebook announced it was opening a research facility in Pittsburgh, Pennsylvania.
The Kauffman Foundation reported last month that San Francisco fell 10 spots in its annual tech start-up activity index, meaning fewer start-ups and investments have poured into the Bay Area, with entrepreneurs moving to cities like Miami and Los Angeles instead.
Silicon Valley will have trouble staying the world's tech leader if it bleeds talent, said Mr Carl Guardino, chief executive of Silicon Valley Leadership Group, which represents firms in the tech hub.
He said his group has backed about 300 housing projects like condos in the Bay Area's nine counties, but faced resistance from residents who fear the changes these could bring to their neighbourhoods; city councils have been slow to approve more projects because of this.
"We need more homes. Our cities need to love these jobs and not act like tech workers don't need to go anywhere to sleep at night."