Mechanisms of homeostasis in cells