This is a part of the rather complex science of “Grid balancing”.
Grid balancing is the art of making sure that power production matches power consumption. So if a neighbourhood goes offline/loses power that will lead to a power spike elsewhere, especially if the shutdown is unexpected (like a malfunction in a power transformer station or something similar). If this power spike is large enough it can cause other parts of the electrical system to overload or shut down to prevent overload, which can lead to a cascade failure that might knock out the entire power grid.
However, what normally happens is that a power plant that’s able to rapidly change its power output (specialized hydropower or gas turbine powerplants…or these days a battery storage facility. These powerplants can increase or reduce their power output within seconds) will reduce its power output to match the reduced power use.
Latest Answers