Serverless Architecture Development for Event-Driven Applications
Serverless architecture development designs applications around managed functions and events. It decides where state lives, how one event triggers several steps, and how the system behaves when a later step fails.
Decisions made before any function is written
How small should a function be? Which steps belong together, and which need their own queue? Where does a half-finished workflow wait? Poor answers work in testing and then become hard to follow at the first production failure.
What the design covers
Awkward parts that are planned for
- Cold starts, where the first call after a quiet spell is slower
- Database connection limits, which a burst of functions can exhaust at once
- Local testing, which needs deliberate effort on this model
- Tracing one request across several functions when something fails
Idempotency and retries
Queues and event services deliver a message at least once, so duplicates will arrive. A handler that charges a card or sends an email twice causes real harm. Each handler is written to give the same result when repeated, by checking a unique request key before acting. Failed messages move to a dead-letter queue where a person can inspect them. AWS’s Lambda guidance warns that event source mappings deliver each record at least once, so duplicates can occur. It also says to keep a queue’s visibility timeout above the function’s expected run time, since a mismatch can cause duplicate invocations.
Limits that shape the design
Patterns that recur
- Upload to storage triggers processing
- Order placed publishes an event that billing, stock and notifications each consume
- Scheduled function summarises data overnight
- A step-by-step workflow service coordinates a multi-stage process with retries
Where serverless builds go wrong
How an event-driven build is used day to day
An event-driven application behaves differently from a screen-driven one. Work starts when something happens, such as a file arriving or an order closing. Operations and support staff watch events rather than servers. Staff read each night’s log in the morning.
Agree the evidence before signing off this part.
Use a representative scenario to decide what this part of the system must show and where review is still needed.
No observability
Who responds when a critical customer journey fails?
For “No observability”, trigger a harmless failure in a test environment. Check that an alert reaches the named responder with enough context to investigate, then agree how the team records recovery.
Background reading: Google SRE: monitoring distributed systems
Idempotency and retries
Which identifier keeps two similar names from becoming the same record?
Choose similar-looking entries in “Idempotency and retries” and agree how the team distinguishes them. Check which linked history must remain separate before approving a merge or import.
Background reading: ERPNext: importing linked records
Frequently asked questions
Is serverless architecture suitable for a large application?
For parts of one, yes. Event-driven and background work fits well, while a busy transactional core is better on servers. A mixed design is common.
Do we still need a database?
Yes. Functions hold nothing between runs, so state lives in a managed database or object storage chosen alongside the design.
What if we already have a working backend?
Then it is not rewritten. New event-driven pieces can run on functions beside what exists.
Will our infrastructure cost less?
It depends on the load. Bursty work costs less because idle time is not billed, while steady load can cost more. The figures are estimated before you commit.
Is serverless the same as having no servers?
No. Servers still exist, but the provider runs them. You deploy code and configuration instead of managing machines.
What is a cold start?
It is the extra delay when the platform prepares a new instance of your function after a quiet period. Package size and language choice influence it. Where it matters, keep-warm settings or a different design handle it.
Does serverless cause vendor lock-in?
Partly. Triggers and managed services are provider-specific, though the business logic can stay portable. Where the coupling sits is stated in the design.
How do we stop a function calling itself in a loop?
Avoid designs where a function triggers the event that invokes it again. If a loop starts, setting reserved concurrency to zero throttles every invocation while the code is fixed. Budget alerts give an early warning.
Tell us what you need.
Tell us what your team does today, where work gets stuck and what you want to change.
What happens after you share your requirements
- We review your brief and the systems you already use.
- We clarify the workflow, missing information and the work to consider first.
- The proposed scope sets out the deliverables, responsibilities and dependencies.
- Review the scope and commercial terms before deciding whether to proceed.
Start with your requirements
Describe your current process, the people involved and the change you need. Start with the details you know; we can clarify the rest together.
Share your requirements