How did astronomers at Edwin Hubble time decide the size of the Milky Way Galaxy and settled the Great Debate? I have been reading some books about Great Debate that whether the Milky Way Galaxy was the entire universe and Edwin Hubble settled the debate by identifying some Cepheid variable star (V1) in Andromeda that had 31 days period.
According to the period-luminosity relationship by Leavitt V1 should be much brighter than Hubble observed. So it must be too far way to be in the Milky Way Galaxy. But how did astronomers at Edwin Hubble time measure/decide the size of the Milky Way Galaxy and supported Edwin Hubble claim ? Did they agree on the size of Milky Way back then?
--- update ---
With answers I got so far I learned that Shapley and Curtis disagreed on the size of the Milky Way, which actually made me even more interested in this question because if they disagreed with the size of Milky Way how did Hubble's finding settle the debate ?
https://en.wikipedia.org/wiki/Harlow_Shapley said "Shapley used Cepheid variable stars to estimate the size of the Milky Way Galaxy" without many details. But Mr. Rennie's answer said Shapley used globular clusters to measure the size.
I also read articles like "Where is the edge of the Milky Way? Star discovery could redraw boundaries", which also makes me puzzled that if we just found the new boundary of Milky Way in 2014, how can astronomers in Hubble times agree on the size of Milky Way (with acceptable margin of error)?
 A: To expand on Charles Tucker's answer, we can observe Cepheid variable stars both inside and outside the Milky Way. If we find the distances to all the Cepheids in the galaxy this gives us the size of the Milky Way.
There are some potential ambiguities. For example we cannot be absolutely certain that a Cepheid we observe in the Milky Way is actually in the Milky Way and not some distant Cepheid that happens to line up with the Milky way and shines through it. To get round this we observe many Cepheids that appear to be in the Milky Way and we find the vast majority are with a hundred thousand light years or so. This implies the Cepheids in this distance range are in the Milky Way and hence gives us the size of the Milky Way.
Also measuring Cepheids gives us a lower limit on the size since in principle there could be non Cepheid regions of the Milky Way that extend to larger distances. But again we observe lots of Cepheids and find they are roughly uniformly distributed throughout the galaxy.
The way this was actually done was that Shapley measured the distance to the globular cluster M13. I think he did this by observing a Cepheid in M13 though surprisingly I cannot find a definitive statement on this. Anyhow, Shapley then assumed:

*

*the globular clusters were all roughly the same size so knowing the distance to M13 the distance to the other globular clusters can be found from their brightness.


*the globular clusters like on the edge of the Milky Way so measuring their distance determines the distance to the edge of the Milky Way and hence the size of the Milky Way.
Shapley then determined the distances to all the globular clusters and found they lay at distances that enclosed a disk of diameter about 300,000 light years. He took this to be the diameter of the Milky Way.
A: You are right - there were two key differences between Harlow Shapely and Heber Curtis when they took part in the Great Debate. One was over the distance to the Andromeda nebula; the other was over the size of the Milky Way itself.
There are good accounts of the Great Debate of 1920 in the Wikipedia articles on the Great Debate and Harlow Shapley and this NASA page.
Shapley’s opponent in the debate, Heber Curtis, correctly identified Andromeda as a separate galaxy. But he believed the Sun was close to the centre of the Milky Way whereas Shapley correctly placed the Sun in the outer regions of the Milky Way. Shapley, on the other hand, believed the Milky Way to be much larger than it actually is.
Although Shapley believed at the time that the Andromeda nebula was part of the Milky Way, he watered down his arguments in the debate itself. It is generally believed this was because he thought becoming entangled in a controversy would damage his chances of being appointed as the next Director of the Harvard University Observatory.
Shapley was appointed Director of the Harvard University Observatory in 1921. Ironically, this was where Henrietta Swan Leavitt collected her extensive data on Cepheid variables and established their period-luminosity relationship. It was this relationship that led to Edwin Hubble conclusively proving in 1924 that Andromeda was too far away to be part of the Milky Way.
A: They used period-luminosity-relationship of cepheids, which was found by Leavitt, see https://en.m.wikipedia.org/wiki/Henrietta_Swan_Leavitt.
