I want to share a few words regarding the effects of sugar (especially high blood sugar) on the immune system:
a) Hyperglycemia which increases the risk of mortality has a huge effect on suppressing the immune system. High blood sugar inhibits chemotaxis (the movement of the white blood cells through the body towards where they need to do their work, like, infection or a part of the body that is damaged).
b) Impaired phagocytes: phagocytosis is a mechanism where certain white blood cells will engulf, kill and eat pathogens (viruses, bacteria, fungus, mold...). There are two main phagocytes:
neutrophils: which make up 90% of all the pus in the body after an infection. Their lifespan is short, while sugar decreases them in number
macrophages: big phagocytes, our guards, whose quantity also decreases thanks to sugar
So, consuming a lot of sugar, and having high blood sugar ensures the "removal" of the body's army.
c) Inhibits complement cascade, which is a series of events that will cause the bacterial membrane to burst. Basically, it is a mechanism that helps kill bacteria.
d) When you have high levels of sugar in the blood, you develop acidosis, so the Ph starts to go down (it is more acidic). That by itself inhibits immunity.
e) It slows down the white blood cells moving through the tissues (organs, blood vessels, etc).
f) One of the big effects of having high sugar is the destruction of the vascular system, especially the nerves. With high sugar, you'll have less oxygen through the body, which means it increases the microbes that live in that environment. Those microbes are called "anaerobes". They're pathogens that live in areas that don't require oxygen. Fungus candida increases the risk for infection, fungal infection, candida infection, etc.
g) You're gonna have less of the innate immunity ("the wall", inner skin). Hyperglycemia destroys those barriers, so, then you don't have the protection like you did when you were healthy.