But historically, a mass quarantine is an aggressive response that is far from perfect. In the past, it has led to political, economic and social consequences.
The closure of Wuhan, a city of more than 11 million people where the virus originated, is "absolutely incredible," Howard Markel, a professor and director of the Center for the History of Medicine at the University of Michigan, told CNN.
"I've never seen an entire city of 11.4 million people shut down like that," Markel said. "I thought I had seen everything."
Lawrence Gostin, professor of global health law at Georgetown University and director of the World Health Organization's Center for Global Health Law, said the move was "outstanding," and he thought, "very unwise."
"Nothing on this scale has ever been tried," he told CNN. "There is very little evidence of effectiveness. And I think there is good reason to believe that it can backfire, from a public health, social, human rights perspective."
No quarantine goes perfectly
People criticize quarantine because a virus or bacteria in practice "always gets loose," Markel said, and so do people. "Every quarantine, people come out," he said. "They just do that, especially in this magnitude."
Larger quarantines like the one in Wuhan are generally avoided today, with the medical community more focused on providing treatment, medication and vaccines to prevent them altogether, according to Markel.
Quarantine "may be things or strangle things for a while," he said, "but they are not the best things to use long-term. "
There are also human rights consequences when Wuhan and more than a dozen other Chinese cities are put under arrest, Gostin said. "I don't think you can enforce a mass quarantine of 30 million people without violating human rights."
Gostin also questioned the approach's effectiveness, pointing to smaller quarantine during the 2014 Ebola outbreak in West Africa. "It spurred public violence, it was … distrust of public health authorities, people did not come in for treatment and it was believed that it actually put back the outbreak response significantly," he said.
There are wider economic and social consequences
But outside the sphere of public health, quarantine can present wider societal problems. Perhaps the most obvious is the economic impact.
Quarantine "is often very economically and economically costly," said Alexandre White, associate professor of sociology and history of medicine at Johns Hopkins University.
The flow of trade in and out of the quarantine zone is halted, and goods in the process of being shipped may go bad – depending on how long it lasts.
"As the quarantine extends, the economic and social difficulties of the quarantine community will expand, requiring the provision of food and services and also hindering local economic activity," he said.
These economic effects are a big part of why quarantine is seen as a "less desirable course of action," White said.
Then there are the social consequences, White said, especially for marginalized members of a community. Historically, he said, the aggressive control needed in a quarantine can link the disease to marginalized people and potentially fuel existing concerns about race and class.
White pointed to an outbreak of bubonic plague in Cape Town in 1901 that led to a racially segregated quarantine camp, which he said was used as a plan for racial segregation during apartheid.
Markel told CNN that it was a "long history of quarantine being abused as a social separator, rather than a public health."
"There is a danger of stigmatization," he said, "that marginalized groups are rightly concerned and afraid. "
Trust and cooperation are key
There is still much unknown about the coronavirus outbreak and how Chinese officials are responding to it.
But in general, trust and cooperation with the public is the most important thing for officials to have in a public health crisis, Gostin said.
Without it, people will not come in for testing and will not share the names of people they have been in contact with – an important part of the strategy to prevent the spread of disease.
"People get save, they shoot … You can't go to social clubs, you can't see friends. A lockdown of 30 million people – that really encourages life. "
Gostin thinks the best way to deal with a situation like the one in Wuhan is a "wave of public health response," he said. It should be easier for people to come to hospitals, and there should be mobile clinics that meet people at their homes to provide testing and treatment.
Governments implementing a quarantine should still want the public's cooperation, Markel said. The government should provide plenty of explanation and keep constant communication
"It's important to get buy-in from the people you protect," he said, "and always better than asking people to do things."
CNN's Amanda Sealy and Elizabeth Cohen contributed to this report.