I've never seen a country with more than 15 major distinct ethnic groups stay together without brutal repression.
If this is a reference to the USSR, then the distinctions made between that and India/South Africa seems rather blurry since Russians were the outright majority of the population and given that in South Africa the dominant ethnic group you referred to ("blacks") is not actually unified linguistically (Zulu, Xhosa, Sotho, Swazi,...etc which at least are all South Bantu languages, never mind the KhoiKhoi and San languages which aren't Bantu languages at all)), culturally (see before, plus the Khoikhoi and San) or ethnically. The East Slavs (Russians, Belarusians, Ukrainians) formed something like 65-70% of the USSR's population and they had more linguistic similarity between them than the San do with the Zulu.
India and South Africa both have dominant ethno-religious groups. Indonesia has one language.
Indonesia has one language? That's a
massive oversimplification. Indonesia has 700 languages. Yes, 80% of the population speaks Indonesian, but then Indonesian itself is a standardized variant of Malay and in that respect there is somewhat more similarity to the situation that existed in Yugoslavia where Serbian and Croatian are very close such that during the time of Yugoslavia it was standardized (at least as a written language though with two alphabets) as "Serbo-Croatian" and spoken as the native language (in some dialect or another) by at least 70-75% of the population and was the second language for many in Slovenia and Macedonia.
In fact, Indonesia rather resembles Yugoslavia in some key respects
except it didn't have nearly 50 years of communism to destroy it:
Dominant Ethnic Group in Indonesia - Javanese - 40% of the population
Dominant Ethnic Group in Yugoslavia - Serbs - 36% of the population
Main Language of Indonesia - Indonesian - spoken by 80% of the population (however it is
not a first language for most Indonesians as even the 2010 census showed that approximately only 20% spoke Indonesian at home; it is mainly a second language and the lingua franca of the archipelago; most Indonesians speak both Indonesian and a local language such as Javanese, which was spoken in over 40% of households even in the 1980 census. Javanese by the way has some noticeable differences to Indonesian despite being in the same broad language family)
Main Language of Yugoslavia - Serbo-Croatian - spoken by 75% of the population (a lingua-franca consisting of what are
now four mutually intelligible standardized forms (or dialects or languages, YMMV), but *arguably* only 2 standardized forms throughout most of Yugoslavia's existence, with the standardized forms being the native language for most persons, so Croatian being spoken by about 20% of the population and Serbian being spoken by about a third of the population or so).