A historic migration is under way around the world, from the countryside to swelling urban centers. Many of those new arrivals will find a better life. Others won't.
For governments, businesses and policymakers trying to manage that explosive growth, pace of this mass urbanization presents an epic challenge.
"The urbanization that happened after the industrial revolution in the highly-industrialized countries was much, much more gradual than urbanization is now," said Janice Perlman, an author and founder of the Mega-Cities Project. "Still, there was a lot of chaos and difficulty and a lot of environmental problems. But now it's just accelerated exponentially."
Today some three dozen cities around the world make the megacities list of more than 10 million population, including Tokyo, Chongqing, Shanghai, Beijing, São Paulo, New York, Mexico City, Mumbai, Osaka, Delhi and Dhaka, according to data compiled by Oxford Economics. By 2030 more than a dozen more will be added to the list.
Some of these new entrants to the club of these megacities will be vibrant economic and cultural centers that raise standards of living and quality of life. Others will struggle with congestion, pollution and poverty, much as developed cities did in their infancy.
Still, there's little doubt that the massive global migration to urban centers is irreversible and unstoppable.
"It's as much to do with the lack of opportunity in rural areas as opposed to this great magnet of cities," said Graeme Harrison, an economist who tracks the growth of megacities at Oxford Economics. "Because everything else—such as unemployment and high cost—would normally act against people migrating to cities."
A hundred years ago just 2 out of 10 people on Earth lived in cities. Today more than half the world's population lives in cities, generating some 80 percent of global economic output. By the middle of this century, 7 out of 10 people will be urban dwellers, according to Hot Spots 2025, a report prepared by the Economist Intelligence Unit for Citibank.
To be sure, any forecast 25 years into the future is nothing more than a rough guess. Population trends will shift based on a city's ability to cope with the last wave of migration—or the political backlash aimed at curbing it. Continued economic growth depends on wider forces at work in a given country or the industries that cluster in an urban area.
A major challenge these cities will pose for society will be the strain on resources. Globally, cities today represent 2 percent of the Earth's surface but use 75 percent of its resources, according to Euramet. As the urbanization trend accelerates, so, too, will issues of sustainability and infrastructure to support city dwellers.
(Read more: America's cities on the edge)
"Over time, there can be supply constraints, they can run out of labor, their costs can become too high, or there can be other, competitive problems, like congestion or pollution," said Harrison. "But getting data on that across different cities or a uniform global data set on that—it doesn't exist."
Still, local governments, businesses, urban planners and policymakers are scrambling to figure out how to manage the looming surge in growth. While the evolution of emerging megacities is unpredictable and complex, there are some common attributes that economically successful cities share, such as economic strength, human capital, financial maturity and global appeal.
Urban "agglomerations"—the sprawling population concentrations that spill over beyond political boundaries—are more difficult to manage when multiple, regional governments are involved with no clear overall authority.
That's one reason the most competitive cities will be those with strong institutions—from government to businesses to cultural groups—that can help foster growth and address problems that arise, according to the authors of the Citibank report. "A city's ability to tax, plan, legislate and enforce laws and its willingness to be held accountable by its citizens requires strong institutions," they said.
Nowhere is that more evident in the developing world than in China, where a historic migration set in motion three decades ago is expected to add dozens of new megacities over the next 30 years.
"China is in a unique position in that it has a strong enough government that it can just do what needs to be done," said Harrison. "It's good at planning. If it sees a problem, it will solve it."
But even in China, new arrivals from rural areas don't pay attention to political lines drawn on a map or follow the wishes of city planners. And efforts to keep them back on the farm—from China's hukou household registration system to investments in upgrading rural services—hasn't stopped the ongoing wave of urban immigration.
That's created enormous demographic challenges as a younger, mobile generation moving to cities leaves behind an aging population on the farm. When those younger urban transplants go job hunting, they're often disappointed in their prospects.
"I would be worried about the Arab spring repeating across many other parts of Africa, just given the outlook for youth unemployment," said Harrison. "A lot depends on how authorities respond to some of these challenges."
The most competitive cities are also those blessed with well-developed infrastructure or the capital and political capacity to build it. That's created a major challenge for some already congested cities in the developing world.
Officials in Jakarta, Indonesia, for example, have been planning to roll out a local mass-transit system for years, said Harrison.
(Read more: The world's best cities for young people)
"But to actually construct that metro would cause so much disruption in the short run, and the traffic congestion is so bad already, it's almost beyond the point where you can install it," he said. "When you have that type of problem, it's very difficult to move forward. You're always playing catch-up."
But robust infrastructure alone doesn't guarantee long-term economic success. Rapid industrialization may help lift incomes and standards of living, but it also strains city services, like housing, education and health care. Newly built coal-burning power plants are generating adequate power for Chinese factories, but they're fouling the air. Despite ambitious construction of intercity rail and highways, Beijing's local roadways are routinely snarled with epic traffic.
And as developing economies emerge from industrialization to more advanced service economies, it's not clear they'll all be able to make the transition, said Harrison.
"Not every Chinese city can become a service hub," he said. "So you could have some Detroits in China, given the number of industrial cities there."
Globalization also means megacities will increasingly compete with each other, fostering specialization in key industries or services—from finance to technology. Those changes in the economic global playing field will also shift the geopolitical balance.
For example, by the middle of this century, Wuhan in China is expected to generate more than 10 times the GDP growth of Auckland, New Zealand, according to a recent report by the McKinsey Global Institute.
"But most countries have more diplomats in Auckland than they have in Wuban—if they have any at all in the latter," the authors noted.
While the forces fueling the growth of megacities are fairly well established, the solutions to the challenges they face are far less clear. Much as the development of New York City was driven by unforeseen developments, like the construction of the Erie Canal, or waves of migration from Europe, the challenges emerging cites face and the solutions they deploy are impossible to forecast.
Just as the new technologies are driving growth, for example, they're also providing solutions. In India a company called LabourNet is helping to match up local jobs for unemployed workers living in slums and low-income neighborhoods, said Perlman.
"These cities will have the creativity to meet each new level of challenge with new technology in a way we can't even imagine," she said. "Technology—if it's put in the service of the marginalized and the vulnerable populations—they will be able to use it to solve these problems."