Sustainability in Serverless
What, Why, and How?
Sheen Brisals
The LEGO Group
sheenbrisals
What is Sustainability?
Sustainable environment
Financial sustainability
Sustainable industrial processes
Sustaining our life
Sustainable transport system
Sustaining is a process ofkeeping something
going for a prolonged period by nurturing it with
a continuous provision of nourishment to
ensure its growth and existence.
Sustainability is a societal goal that broadly
aims for humans to safely co-exit on planet
Earth over a long time. - Wikipedia
Social
3 Pillars of Sustainability
Economic Environmental
Social
3 Pillars of Sustainability
Economic Environmental
Economic growth may impact the environment
Social well being may have an effect on the environment
3 Pillars of Sustainability
Environment
Society
Economy
3 Elements of Cloud
Cloud
Compute
Storage
Network
The Cloud Journey
2 meters
You Tom
Storage
Compute
Network
Storage
Compute
Network
Storage
Compute
Network
Mere 2 meters now stretches over 200, 2000, or event 20,000 miles
3 Parts of Sustainability in Serverless
 Serverless products we develop
 Development processes we follow
 Cloud where we deploy and operate
Process
Product
Sustainability
in
Serverless
Cloud
Sustainability Triangle
Buildingsustainable
serverless solutions
Following sustainable
development processes
Applyingcloudbest practices
Sustainability of the cloud
Sustainability inthecloud
Sustainable Products
Serverless requires a new way of thinking, working, and
running applications. Meaning, we need to change our old way of
thinking, working, and running applications.
Your software needs to be operated for decades longer
than you took to write it.
Old vs Serverless Way
Old way of thinking
Idea Design Build Operate Sustain
Serverless way of thinking
Requirements Analysis Design Development Testing Release Maintenance
BigBang
Incremental &Iterative
Done& Dead Doing&Alive
Siloed Specialists
Full stack& Diverse
Serverlessrequires a mind-shiftto see the
products as event-drivenorchestration of
managedservices,knitted with infrastructure
code, to bringthe best value.
It’s a nightmare!
I can’t touchit
It’s hopeless
It’s just a piece of ****
Symptoms of a non-sustainable application
Modularity
Extensibility
Observability
Characteristicsof
Sustainable
Products
• Domains,boundaries,contracts
• Independentsmaller microservices
• Asynchronous andloosely coupled
• Event-drivenarchitecture
• Structured logs anddistributedtraces
• Measurablemetrics
Characteristics of a sustainable application
Sustainable Processes
People
Process
Cloud
Mind
Method
Machine
Sustainable Processes
People
Process
Cloud
Minds
Method
Machine
Methods and tools that guide us
to build sustainable serverless
applications and operate them in
the cloud.
Reduce
development waste
Be agile and
practical
Automate
everything
Improve value
stream map
Reduce service
churn
Followlean
principles
Don’t throw-away
prototypes
DRY
Do Reuse Yourself
Start small and
scale
Evolve product in
iterations
Think product
longevity
Minimum viable to
Maximum valuable
Improve developer
experience
Perform continuous
refactoring
Grow serverless
engineers & teams
Sustainability & Cloud
Cloud Provider= Vendor
Sustainability & Cloud
Cloud Provider = Vendor Partner
Sustainable cloud operation is a partnership
between the provider and the service consumers.
The responsibility is shared.
Renewable
energy
Efficientpower &
cooling
Sustainability
of the Cloud
Development
language
Datastores&
policies
Sustainability
in the Cloud
Server population
Rightsizing
resources
Sharedresources On-demandscaling
Compute & storage
tiersoptions
Managedservices
Customer
AWS
Shared sustainability responsibility
Sustainability in the Cloud
Best Practices
user
behaviour
data &
storage
software
architecture
compute &
infrastructure
development &
deployment
The first and foremost user behaviour pattern for
sustainability in the cloud is serverless-first.
serverless
Pay for
compute &
storage
Auto scalable
& highly
available
Cloud
computing
model
Scale to zero
& low cost
No server
management
for you
what
Singlepurpose functions
Managed services
Nocontainerprovisioning
Noloadbalancing
Payas youuse
Nocostforidletime
Granular costvisibility
Auto scaledown
Individual servicescaling
Service&data redundancy
User behaviour patterns
Understand
consumer
demand
Use minimum
resources
required
Remove expired
customer
content
Scaleas per SLA
and not over
Plan for high
trafficevents
Work with TAM &
cloud provider
Provision extra
just for the
events
Collect & study
historical
metrics
Servicesclose to
customer base
Deploy services
close to
consumers
Content caching
at the edge
Green region
selection
If you don’t need the data, don’t keep it.
Know when your data-gold turns into data-dust.
Data & storage patterns
Datastore
selection
Data lifecycle Data removal
Data
transition
Data
movement
SQL,NoSQL
Object, document
Graph, timeseries
Temporary cache
Short-term operational data
Long-term active data
Archivabledata
Simple TTL
TTL with transition
Scheduledclean-up
Lifecyclepolicies
Hot & cold data classification
OLTP to OLAP
Data closerto consumer
Data compression
Avoid cross-region transfer
A decoupled, event-driven serverless application,
that is built on managed services, is a step closer
to being environmentally friendly.
Software & architecture patterns
Use queues
smoothen workload
microservices
Event-driven
Fetch
just-the-requireddata
Promote
granularity
Batch jobs
off-peak
Delete
unused services
Cost and performance optimisation of compute has
a new challenger - Sustainability
Compute & infrastructure patterns
 Optimisation Functions, datastores, streams, & queues to just the required level
 Granularity Vary resource allocation as per need.Optimise servicesindividually
 Compute Graviton2 processor for lambda functions
 Services Use managedservicesbuilt & operated in a sustainable way
 Scaling Opt for horizontal scalingand scale-to-zeroservices
DevOps & Automation
Development & deployment patterns
Automate as much as
possible
Maximise the utilisation of dev and
test environments
Automate deployment pipelines
resource lifecycle
Managed services
Incorporate timely uptake of new
services and features
Create awareness
Enterprise Sustainability
Targets
Strategies
Promise
Awareness Action
Sustainability Awareness Week
Day 1 Day 2 Day 3 Day 4
Ideas
Speakers
Resources
Drivers
What is
sustainability?
Cloud &
technology
Social
responsibilities
Outcome &
actions
Day 1 Day 2 Day 3 Day 4
Ideas
Speakers
Resources
Drivers
What is
sustainability?
Cloud &
technology
Social
responsibilities
Outcome &
actions
Identifyingthe
Blockers
Findingthe
Opportunities
Providingthe
Support
Forminga
Community
Sustainability Awareness Week
Team awareness
Carbonfootprint monitoring
More to be done by AWS & other providers
Team action points
Incorporate in the solution design process
https://bit.ly/3tPEe7D
Team action points
Identify sustainability focus areas
Team action points
Incorporate sustainability audit
user
behaviour
software
architecture
data &
storage
compute &
infrastructure
development &
deployment
Audit checklist
Sustainability resources
AWS Well-Architected – Sustainability Pillar greensoftware.foundation
United Nations
To close…
Developing sustainable serverless applications by following
sustainability principles is a journey.
The patterns and practices guide us along this journey to
contribute to a sustainable environment.
Sheen Brisals
Engineer. Architect. Writer. Speaker. Leader.
AWS Serverless Hero
Thank You!
sheenbrisals
sbrisals.medium.com
sheen-brisals

Sustainability In Serverless