What is serverless?
DEFINITION
Serverless is a cloud model where the provider runs and scales your code on demand, so you deploy functions or apps without managing servers and pay mainly for actual use.
Serverless computing does not mean there are no servers. It means the cloud provider handles them entirely: provisioning, patching, scaling and availability. You upload code, usually as small functions, and the platform runs it in response to events such as an HTTP request, a file upload, a scheduled timer or a message in a queue.
Common examples include AWS Lambda, Google Cloud Run functions and Azure Functions, as well as edge functions offered by web hosting platforms. Serverless also describes fully managed databases, queues and storage that scale automatically and bill per use.
Why serverless matters
For workloads with uneven traffic, serverless can be very cost-effective because you pay for execution time and requests rather than idle servers. It scales automatically from zero to large spikes and removes much of the operating system maintenance and patching burden. That lets small teams ship features such as contact forms, image processing or webhooks without running infrastructure.
Example and trade-offs
An online store might use a serverless function to resize product images whenever a new photo is uploaded to storage, and another to process payment webhooks. Both cost almost nothing when idle. The trade-offs include cold starts (a short delay when a function has not run recently), execution time limits, harder local debugging, and potential lock-in to a provider's services. Security shifts toward your code and configuration: give each function only the permissions it needs, validate all event input, keep dependencies updated and store secrets in a managed secrets service.
Best practices
- Give each function its own narrowly scoped permissions role.
- Set concurrency and budget limits to prevent runaway costs from loops or abuse.
- Keep functions small and focused, with dependencies trimmed to reduce cold start time.
- Centralize logs and set alerts on errors and timeouts.
Common mistakes
- Granting all functions a single broad admin role for convenience.
- Creating functions that trigger each other in a loop and generate a surprise bill.
- Using serverless for long-running, constant workloads where a regular server would be cheaper.
Frequently asked questions
Is serverless cheaper than traditional servers?
For spiky or low-volume workloads, usually yes, because you do not pay for idle capacity. For steady, high-volume traffic running around the clock, a reserved server or container can be cheaper. Estimate costs using expected requests and execution time, and set budget alerts after launch.
What are cold starts in serverless?
A cold start is the extra delay when the platform has to start a new instance of your function, for example after a period of no traffic. It can range from milliseconds to a few seconds depending on language, package size and settings. Smaller packages and provisioned capacity options reduce the impact.
Is serverless secure?
The provider secures and patches the underlying servers, which removes a large category of risk. You remain responsible for your code, dependencies, permissions and data. Over-permissive roles, unvalidated input and leaked secrets are the most common serverless security issues, so least privilege and code review remain essential.
Need help with this?
클라우드 및 DevOps by VYZEON — 스스로 확장하고, 배포하고, 복구하는 인프라.
Fixed packages from $199. Written scope, no surprises.
