A person rides a Google bicycle past recreational vehicles parked on Landings Drive in Mountain View.

In a quiet neighborhood near Google's headquarters last month, rusty, oleaginous sewage was seeping from a parked RV onto the otherwise pristine street. Sgt. Wahed Magee, of the Mountain View Police Department, was furious.

"You guys need to take care of it, like ASAP," he said, lecturing the young couple living in the vehicle. "I'm not going to tow it today, but tomorrow if I come out here and it's like this, it's getting towed!" As he delivered the ultimatum, a self-driving car rolled past.

Mountain View is a wealthy town that's home to Alphabet Inc., the world's fourth-most valuable public corporation and Google's owner. Magee spends a lot of his time knocking on the doors of RVs parked on the city's streets, logging license plates and marking rigs that haven't moved for several days.

This is the epicenter of a Silicon Valley tech boom that is minting millionaires but also fueling a homelessness crisis that the United Nations recently deemed a human rights violation. Thousands of people live in RVs across San Francisco and the broader Bay Area because they can't afford to rent or buy homes. In December, Mountain View police logged almost 300 RVs that appeared to be used as primary residences. Palo Alto, Berkeley and other Bay Area towns have similar numbers.

A contract security employee for Google looks at her smartphone in the recreational vehicle she rents for $800 a month in Mountain View.

Some Silicon Valley towns have cracked down in recent months, creating an even more uncertain future for RV residents. At a March city council meeting, Mountain View voted to ban RVs from parking overnight on public streets. The ban hasn't taken effect yet, but soon, the town's van dwellers will need to go elsewhere. The city council also declared a shelter crisis and passed a new ordinance to ticket vehicles that "discharge domestic sewage on the public right of way." At the meeting, some people opposing the ban blamed Google for the housing crisis.

"In my neighborhood there are a group of five or six duplexes and a couple that I know lived in one of them for 22 years. When Google moved in next door, their landlord raised the rent by $700 a month," said resident Susan Barkin. "Preventing parking and throwing more people out of our community is unconscionable. I do not want to live in a town where the only people who can afford to be here are very, very, rich techies or very, very, old retirees like myself."

If representatives from Google were in attendance, they didn't speak up to defend the company or address the housing crisis.

But the issue has arisen inside the Googleplex. At a staff meeting earlier this year, one Google worker asked why Chief Executive Officer Sundar Pichai was paid hundreds of millions of dollars, while some employees struggle to afford to live in the area. Pichai said it has little control over the high cost of living, people familiar with the situation told Bloomberg at the time.

The median rent in Mountain View almost doubled since late 2010 to $4,151 a month. That's nearly triple the national average, according to Trulia. The median home value is $1.8 million, up from $750,000 ten years ago, according to Zillow.

"We have rising rents. We have gentrification. We have people being displaced," said Jennifer Loving, head of Destination: Home, a group that's trying to reduce homelessness in Santa Clara County, home to Google and Mountain View. "All of that together is creating an untenable situation for thousands and thousands of families and individuals who are trying to live and work here."

At first, it's hard to spot RVs that are used as homes. But these vehicles are all over Silicon Valley. They line frontage roads that run alongside highways. There will often be a chain of them on quieter streets in office parks and light industrial areas. But they can also be found on suburban residential streets parked in rows opposite the ranch-style homes common to the area.

The RVs are often white or beige, and the windows are covered with blinds, sheets or blankets for privacy. Leaves and dust sometimes accumulate on the windshield wipers, and some have generators on the back for extra power. Around Google's campus there are sometimes multicolored company bikes parked nearby so RV dwellers can jump on and ride to work.

Soon, these impromptu communities may be gone. Before that happens, Bloomberg spent the past month interviewing RV residents and speaking with officials and other locals about the phenomenon.

One 24-year-old Google contract worker lives in a rented RV with her girlfriend close to the internet giant's campus. She asked that her name not be published, because she didn't want her employer to know about her living situation. She grew up in the Bay Area and served in the Navy for three years. After that, she studied psychology, then moved to Atlanta where she rented a townhouse for $1,050 a month.

She applied online to be a Google security guard and when the contracting firm gave her the job, she moved to Mountain View in April. She initially considered renting a small apartment, but realized she couldn't save any money that way. "An apartment out here would cost at least $2,500 a month," she said. "The money I make here is great, but I would be pretty much spending the majority of that on rent and I just don't want to do that." So she decided to rent the RV for $800 a month.

A family cooks dinner in Rengstorff Park across the street from where their recreational vehicle is parked on Crisanto Avenue in Mountain View.

"There's less space. That's the main thing. It's confined," she said. Her day starts on Google's campus where she can grab a quick breakfast, usually a banana. Lunch is also available at headquarters, while dinner is prepared on the RVs two stove tops. There's no oven.

Complaints from neighbors aren't a problem because she's parked the RV close to Google's headquarters, which is all office parks with very few residential buildings. At night, she takes courses at the City College of San Francisco to become a firefighter. If she can get a job as a firefighter in San Francisco within a year, she'll continue to stay here, she said. "If not, I will take my earnings and go back to Georgia and purchase a home and live happily ever after. I can probably buy a house back there. It's Georgia, it's really cheap."

Another RV resident in Mountain View is a 41-year-old IT professional who now drives for Lyft Inc. He moved from Sacramento about two years ago after his wife got a job at a big drug-development company in Silicon Valley. (He asked not to be identified because he worries his wife might lose her job if her employer learns about her living situation.) Once they arrived, they realized they couldn't afford to rent an apartment and build their savings, despite a combined income of roughly $100,000 a year.

"We just did the math when we were, you know, renting a room, and we could kind of stay afloat but there's no way to save any money for retirement or the future at all," he said.

The Lyft driver, and other van dwellers around him, said they aren't sure what they'll do when the parking ban kicks in, rendering their situation illegal. Many hope to just muddle through somehow. "I'm aware of the ban," said Brandon, another Mountain View RV resident who didn't want to share his last name. "I'll cross that particular bridge when I get to it."

Tech companies should be doing more to fix the housing crisis, the Lyft driver said. "There was a time when corporations were allowed to operate because they were also providing for the communities around them in some way," he said. "And for some reason that responsibility has shifted to profits only."

Google declined to comment, but referred to an interview one of the company's public policy managers, Rebecca Prozan, gave to PBS in 2016. "Obviously, our footprint creates pressure. It creates pressure on housing and transportation, but that pressure isn't just tech. It's not just Google," she said. "It's all the industries that are creating the economy of the Bay Area. We all have to work together to figure out what we're going to look like, and how we're going to live."

When asked about employees living in RVs, she said: "We don't necessarily want to comment on our employees participating in those activities."

Since 2014, Google has given more than $14 million to groups tackling homelessness in Mountain View. That includes $1 million for Destination: Home, and $1.5 million to help with construction of a 67-unit affordable housing development. It also has a plan to invest much more in a project to build thousands of homes on a nearby part of the city called North Bayshore. Twenty percent of that will be affordable housing, although it's a long way from happening: Mountain View hasn't decided how to proceed yet.

Loving, the head of Destination: Home, thinks the North Bayshore plan should include a lot more affordable housing. But she and others say it's not just about money. There needs to be political will-people have to want to help their neighbors in need.

Some Silicon Valley residents don't want new apartment buildings changing their suburban towns, and they get angry at the thought of affordable housing bringing poorer people to their neighborhoods. Two years ago, about 500 local residents showed up at a meeting to discuss small, temporary housing in San Jose. Many screamed and shouted at Loving and her colleagues. At one point, the crowd chanted "build a wall" to keep homeless people away.

"There have been meetings since where there's a lot of fear about what these developments would look like, and fear is a really powerful emotion and it seems to supersede logic," Loving said.

Some cities are beginning to work more affordable housing into their expansion plans. And there's a growing movement of residents who support, rather than fight, such development. But it's nowhere near enough to fix the problem quickly.

That's a risk to Silicon Valley itself, because tech companies may go elsewhere. In February, Pichai, Google's CEO, announced a plan to spend $13 billion on new and expanded offices and data centers. A lot of this is outside Silicon Valley, where it's cheaper to hire talent-in part because housing is more plentiful.

There's a second issue, too. If teachers, nurses, trash collectors and other regular workers can't afford to live the area, the fabric of society begins to fray, according to Alison Hicks, a Mountain View council member who voted against the RV ban.

"To have a regular functioning town you need to have occupational diversity," she said. "You can't have a town that functions if we only have tech workers living in it ... It won't be a functioning city as I know it. It wouldn't be a city I would want to live in."

Back on Mountain View's streets, Magee followed up on the RV that was dripping with sewage. The following day, the owners had fixed the problem.

When asked whether the RV situation will ultimately be resolved, Magee looked tired as he thought about the answer. After a 12-hour day, he had a long drive ahead to get home-he can't afford to live in Mountain View.

"The way things are going, I don't see how it's all gonna disappear," he said. "Where are we gonna put everyone?"