In an analysis of the nation’s 500 largest cities by tech sector employment, job prospects, salaries, and median home list prices, Realtor.com has ranked Huntsville, Ala. the most affordable city in the U.S. for tech employees, followed by Dallas, Tex. and Baltimore, MD.

According to a study by CompTIA, IT workers in Huntsville make a median salary of $91,998, and enjoy a cost of living 3.3% lower than the national average, with a median home price of $266,526. In San Francisco, by contrast, the median home list price is $1.44 million, and the average tech worker makes about $80,000 per year.

"Silicon Valley's extremely low unemployment rate—due to the abundance of tech jobs there—has caused housing costs to skyrocket," says David Armendariz, general manager of the technology division for recruitment firm Lucas Group. "Tech companies are recognizing this, and they're opening offices in other cities.”

Unlike in prior decades, today's tech companies can operate almost anywhere, says KC Conway, chief economist at the CCIM Institute and Alabama Center for Real Estate in Atlanta. And workers are increasingly all-too-happy to follow.

"Today's tech workforce doesn't want insanity—they want quality of life," says Conway.

Read More