Scaling of immune responses against intracellular bacterial infection