{"head":{"title":"What Is Autoscaling? Definition and Example | OceanLab","description":"Autoscaling adds or removes servers or containers as load changes, so you pay for what you use. How it works, what to scale on, an example and pitfalls.","canonical":"https://oceanlab.in/glossary/autoscaling"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"autoscaling","path":"/glossary/autoscaling"}],"slug":"autoscaling","term":"Autoscaling","aka":["auto scaling","elastic scaling"],"category":"Hosting and delivery","short":"Automatically adding or removing computing capacity, such as servers or containers, as the load on a system goes up or down.","body":[["An autoscaler watches a signal, such as CPU use, request count or queue length, and starts more instances when it passes a threshold and removes them when load falls. It works best when the app is stateless, so any instance can handle any request."],["Scaling out (more instances) is the usual pattern. Scaling up (bigger machines) is slower and has a ceiling. ",{"href":"/glossary/serverless","text":"serverless"}," platforms autoscale for you, down to zero when there is no traffic."]],"why":["Without autoscaling you either pay for peak capacity all day or fall over at peak. With it, cost follows usage. But it does not fix bottlenecks further back: if the database is the limit, more app servers only make it worse."],"example":["A ticketing site sees huge spikes when sales open. Its web tier scales on request count from four containers to forty in minutes, and a ",{"href":"/glossary/message-queue","text":"message queue"}," holds payment jobs so the payment workers scale on queue length instead of crashing."],"inBuild":["We keep app servers stateless, put sessions and files in shared stores, and scale on the signal that matches the bottleneck. We also set a maximum, so a bug or an attack cannot scale the bill without limit, and load test before big launches."],"mistakes":[["Scaling the app tier while the database runs out of connections."],["No upper limit, which turns a traffic spike into a surprise bill."],["Slow startup times, so new instances arrive after the spike is over."]],"related":[{"href":"/glossary/load-balancer","label":"Load balancer","detail":"A service that spreads incoming traffic across several servers, and stops sending traffic to any that fail their health checks."},{"href":"/glossary/serverless","label":"Serverless","detail":"A cloud model where the provider runs your code on demand and manages the servers, and you pay for what you use rather than for idle machines."},{"href":"/glossary/kubernetes","label":"Kubernetes (K8s)","detail":"An open source platform that runs and manages containers across a group of machines: starting them, restarting them, scaling them and routing traffic to them."},{"href":"/glossary/connection-pooling","label":"Connection pooling","detail":"Keeping a set of open database connections and sharing them across requests, instead of opening a new connection for each one."},{"href":"/glossary/cold-start","label":"Cold start","detail":"The extra delay when a serverless function or a new server instance has to start up before it can handle a request."}],"tools":[],"links":[{"href":"/pricing/categories/cloud-hosting","label":"Cloud hosting pricing","detail":"Hosting prices side by side, with sources."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}