While the multi-ethnic nature of the Hapsburg and Ottoman Empires is often cited as the primary reason for their declines in the nineteenth century, other factors also entered into the equation. One factor that seems to have played a major role in determining the nature of Hapsburg rule and society as well as its decline was disease. In order to understand this we need to look at German expansion into Central and Eastern Europe in the Middle Ages.
As the German people expanded into Central and Eastern Europe and established themselves and the ruling class in such areas as Bohemia, they tended to settle and concentrate in towns and cities from which they could rule the countryside. However, both the crowded and unsanitary conditions in cities then led to serious problems with disease. As a result, the ruling German class could rarely sustain its own population, let alone expand its numbers. Fortunately, there was a gradual influx of native Slavic migrants to the cities to replenish their populations. Since this migration was gradual, the ruling German classes could maintain their dominance until these newcomers had absorbed German culture and values, even adopted German names, and been accepted into the ruling classes. For centuries this pattern of gradual absorption of Slavic migrants served to maintain German cultural and political, if not ethnic, dominance of the cities and power in the empire.
However, two things upset this delicate balance in the later 1800's. One was a cholera epidemic that severely depleted the Germanized populations in Hapsburg cities. The other was industrialization, which created a need for a large factory work force. Together these triggered a huge influx of Slavic migrants into the cities. This much larger Slavic population in the cities proved too much for the Germanized ruling classes to absorb as they had before. It also generated a fear that Slavic culture would overwhelm German culture. This created a growing conservative backlash against the Slavs. That in turn led to growing resistance by Slavic nationalist groups against the Germanized ruling classes which merely caused more conservative reactions and so on.
As this cycle repeated itself, Hapsburg society became progressively polarized between the growing restiveness of its Slavic nationalities and ethnic groups on the one hand and the siege mentality of its increasingly isolated and reactionary ruling classes on the other. Therefore, by the early twentieth century, the Hapsburg Empire was on the verge of collapse. World War I would push it over the edge.