Protein folding homeostasis in the endoplasmic reticulum