SEATTLE—If it didn’t rain here so much, the city might consider adopting a new motto: The future’s so bright we have to wear shades.

Seattle exemplifies the powerful current of economic vitality that is transforming many of the nation’s largest cities as they connect more deeply to the digital economy and global markets. Over the past decade, Seattle has added 220,000 jobs, an increase of nearly 15 percent. Amazon, which employs 40,000 people here and holds about one-fifth of the city’s premier office space, has keyed that growth, but the revival has spilled far beyond it. Thirty-one Fortune 500 companies now operate research and engineering hubs in Seattle, up from seven in 2010. More construction cranes are working here than in any other U.S. city, many in the South Lake Union area where Amazon has centered its burgeoning operations. Seattle is now adding about 60 people daily, many of them well-educated Millennials. That’s the city’s most rapid rate of population increase since the Klondike Gold Rush around 1900.

Seattle is also confronting a homelessness crisis, grinding traffic congestion, and a housing-affordability squeeze that is displacing not only low-income families but also middle-income earners, such as teachers and police officers. Svenja Gudell, chief economist for Zillow, the housing website based here, reports that over the past year, house prices grew faster in Seattle than any other city, and rents increased faster than anywhere except Riverside, California. Like other new economy hubs such as Austin and Denver, Seattle is also struggling to connect its own kids from low-income and minority neighborhoods—kids of color now represent a majority of its public-school students—to the opportunities bursting around them.

In the 20th century’s last decades, many cities struggled against systemic decline. (In the 1970s, after a wave of layoffs at locally-headquartered Boeing, local residents put up a famous billboard that read: “Will the last person leaving Seattle—Turn out the lights.”) Now, with that fear behind them, Seattle is testing whether cities can manage the challenges of success.

“I’d much rather be in the position we are today where we have economic growth and [are] thriving economically than the opposite of that,” Tim Burgess, the city’s acting mayor, told me at a forum Tuesday night. “What’s important for city government is to make sure we are addressing … the built-in injustices when that economic growth happens, because we know that some [people] are left behind in that situation.”

An Atlantic Media/Allstate Regional Renewal poll of the Seattle region released this week showed that the area’s residents are acutely aware of both sides of that equation. The survey, conducted as part of a nationwide Atlantic Media project that is exploring local innovation, found enormous optimism about the region’s economic trajectory. Three-fourths of those surveyed said they believed it would be best for their career and family life to remain in the Seattle area, and about two-thirds said that young people would have more economic opportunity if they remained as well. About two-thirds likewise described the local job market as good or excellent. Two-thirds said the region was moving in a positive direction.

But 70 percent of those surveyed said the city was unprepared to handle its growth. Another 70 percent agreed the region “is growing in a way that is benefiting only a few and making it too difficult for average families to live here.” Strikingly those views were almost as prevalent among those who had moved to Seattle as adults as they were among lifelong residents. Over half of those surveyed gave negative marks to the region’s transportation mobility and two-thirds gave poor ratings to its housing affordability. (The survey, conducted from September 20 to 24 by FTI Consulting’s Strategy Consulting and Research practice, has a margin of error of plus or minus 4.9 percent.)

Burgess told me he thought both the poll’s positive and negative assessments were justified. “We struggle with these issues,” he said, “but we are taking some deliberate steps to remedy them.” That’s an understatement: Few cities have moved as aggressively as Seattle to confront the challenges of growth.

In recent years, the city has increased its local minimum wage to $15 per hour; launched a pioneering program to expand access to public pre-school; required employers to provide hourly workers with more scheduling certainty; and developed a sweeping plan to mandate that developers construct more affordable housing. Jenny Durkan, who earlier this month was elected as the city’s first woman mayor since 1926, has proposed to fund up to two years of community college tuition for the city’s high school graduates. On Monday, the city approved a tax on short-term rentals (such as Airbnb) to fund expanded services for the homeless, and later this week, it will appear in court to defend a tax on high-income earners the city council unanimously approved in July.

The jury remains out on many of these initiatives. A University of Washington study concluded that reduced hiring and hours worked for low-income workers has blunted the benefits of the higher minimum wage. Local critics consider the housing reforms too meager. The proposed levy on high earners may violate state restrictions on taxing incomes.

But the impulse that binds these disparate ideas is the right one. As the biggest cities regain their place as the nation’s locus of economic opportunity, they must find ways to channel their growth to benefit all of their residents, not just a well educated, tech-savvy few—many of which are relocating from elsewhere. Seattle hasn’t necessarily found all the right answers, but it is ahead of most places in asking the right questions.