Nutrition is probably the most important modifiable factor for preventing modern diseases. A healthy and anti-inflammatory diet should be rich in saturated and monounsaturated fats, low in vegetal polyunsaturated fats (especially linoleic acid), moderate in animal protein and low in carbohydrates. The main food sources should be fatty animal products. If you want to get the benefits of ketosis (as I do), protein and carbohydrates should be restricted, especially the latter. Beta-hydroxybutyrate is a superfuel: it increases the delta G of ATP hydrolysis while reducing oxygen consumption due to its higher inherent energy compared to pyruvate. It also protects against oxidative stress and mitochondrial damage. Ketosis represents an anti-inflammatory metabolic state, increasing mitochondrial respiration, reducing glycolysis, reducing serum levels of mitogenic factors, increasing autophagy, among other effects.
For more information on healthy diets, you can check The Perfect Health Diet, Archevore or Eat like a predator.
The importance of a healthy immune system
The most important role of the immune system is to discriminate between self and non-self antigens (immune tolerance). The development and establishment of this process begins early in life, at the moment we are born. Genetic, as well as environmental factors help shaping this process. Mode of delivery, early nutrition practices and exposure to environmental pathogens and organisms are some of the determining factors which influence the immune system. When self tolerance breaks, autoimmunity develops.
The link between inflammation and autoimmunity
Conventionally, autoimmune diseases are seen as the result of deleterious mutations. Indeed, several SNPs have been characterized as being an important predisposing factor for the development of autoimmunity. However, chronic low grade inflammation can also result in autoimmunity. Chemically modified self-proteins present in inflamed tissue can generate neoepitopes that trigger an immune response. Peripheral B cells can also undergo secondary V(D)J recombination, thus recognizing these neoepitopes, which can be also presented to T cells.
Disruption of intestinal barrier function as a result of inflammation alters the normal immune response as several peptides can pass this barrier and be recognized and presented. Inflammation also alters gut flora composition, which is one of the key components of self-tolerance and regulates many functions of the host.
Gut microbiota is very responsive to diet and environmental factors. This has also been observed for the gut virome. This is why a healthy anti-inflammatory diet helps to prevent and treat autoimmune diseases, allergies and modern diseases.