Amazon Prime Video released an article explaining how they saved 90% on cloud computing costs by switching from microservices to a monolith. Let's examine the details of their software architecture and find out why serverless was a bad choice. 

#programming #aws #thecodereport 

💬 Chat with Me on Discord

https://discord.gg/fireship

🔗 Resources

Prime Video Serverless Article https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90
Majestic Monolith https://m.signalvnoise.com/the-majestic-monolith
AWS for the Haters https://youtu.be/ZzI9JE0i6Lc

🔥 Get More Content - Upgrade to PRO

Upgrade at https://fireship.io/pro
Use code YT25 for 25% off PRO access 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- Monolith vs Microservice
- Pros and Cons of serverless
- Serverless pitfalls
- AWS lambda vs EC2
- What is a microservice
- How to save money on AWS
- Startups that have left the cloud
2024-02-04T05:06:32.619Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
5d2676ac-4326-42b9-aa6e-5e4e052b9443
74224e4196dd2b4e1a5949c0e7123a964bf276daec25087d10f9a8a8a2815b69
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
It is May 6, 2023 and you're watching the Code Report.
Serverless is the biggest lie in the history of computers.
When you go serverless, you're still using a server, it's just not yours.
You'll compute nothing and be happy.
Amazon Prime Video just dropped a shocking article explaining how they Save 90% on their Amazon Web Services bill by switching from serverless microservices to an old fashioned monolith architecture.
That's great news Amazon, because it'll save a ton of money, but bad news for Amazon, because it just lost a great revenue source.
The article is sending shock waves through tech right now, because one of the main claims of the Serverless vision is that you can scale infrastructure more efficiently, which in theory should cost less money.
I really appreciate Amazon's transparency here because they're one of the original pioneers of Serverless with Lambda functions.
And nowadays, you have tons of platforms offering serverless services like Vercel and Netlify, which are actually just using and reselling AWS services Behind the scenes, there's almost an entire industry of startups that make AWS easier to use, including open source projects like the serverless framework and SST.
But not Everyone is drinking the Kool Aid.
Like, DHH, the creator of Ruby on Rails and Basecamp, has been advocating for a majestic monolith for the last decade and took his entire company off the cloud after they Spent over $3,000,000 in 1 year.
Now they just run their own servers.
A lot of successful start ups like Dropbox end up leaving the cloud once they get big enough.
However, I personally use serverless my projects, and it's an absolute game changer for getting things done quickly.
Although, I have accidentally created a few infinitely scaling infinite loops That could have potentially cost me an infinite amount of money.
But what's the difference between a microservice and monolith architecture?
At Prime Video, they needed a tool to analyze audio content or issues Like video freeze and corruption.
To implement this tool, they use multiple serverless functions called step functions, which are basically the same thing as Lambda, to handle different responsibilities.
You have an initial entry point, which kicks off another service to do a file conversion.
That converts an audio video stream into frames that can be used by the detector.
You've got Uh, multiple detectors using machine learning to analyze the video.
Then finally, you have another function to aggregate the results and store them in a bucket.
But there's a little bit of overhead every time you data from one service to another.
They need to serialize and deserialize data and communicate over a network.
In this case, their service needed to run multiple Well, times for every second of a video stream, and they quickly hit a bottleneck with their account limits just trying to orchestrate the service.
In addition, By temporarily uploading files to s 3, they were burning through money just accessing these files in the buckets.
They realized that the distributed architecture was the root cause of these bottlenecks, causing them to make a bold decision to rearchitect to a monolith.
Instead of running decoupled distributed services, they took everything and made it run on a single All the components are the same, but now that they run on a single server, they can only scale vertically.
That means to do more work, they'll need to make each server bigger, unlike the Microservice architecture, which could scale horizontally by creating more service for each individual component based on its scaling needs.
That seems like it would be a drawback, but it eliminated All kinds of unnecessary communication and network usage that reduce their cost by 90%.
And for a product of this magnitude, that means 1,000,000 of dollars saved.
So I guess the takeaway is that if you're Using microservices, you should probably cobble them together into a monolith right now.
Well, not so fast.
In this case, the optimization was pretty obvious.
Famously, back in 2000 Netflix was based on a monolith architecture and had a massive failure that motivated them to break their architecture into 100 of different microservices that scale independently with Vault Tolerance.
It might be more complex and expensive, but if Netflix goes down for a few hours, it'll cost them way more money and lost memberships.
Then for small businesses like me, I can easily deploy my shitty JavaScript code without ever having to think about infrastructure.
I rarely even bust out of the free tier, and when I do, it's money well spent because I have peace of mind knowing that I'm not going to deploy some bad code to my monolith that takes down my entire operation.
Ultimately, when it comes to cloud architecture, there are No solutions, only trade offs.
This has been the CodeReport.
Thanks for watching, and I will see you in the next one.

Speaker 0: It is May 6, 2023 and you're watching the Code Report. Serverless is the biggest lie in the history of computers. When you go serverless, you're still using a server, it's just not yours. You'll compute nothing and be happy. Amazon Prime Video just dropped a shocking article explaining how they Save 90% on their Amazon Web Services bill by switching from serverless microservices to an old fashioned monolith architecture.

That's great news Amazon, because it'll save a ton of money, but bad news for Amazon, because it just lost a great revenue source. The article is sending shock waves through tech right now, because one of the main claims of the Serverless vision is that you can scale infrastructure more efficiently, which in theory should cost less money. I really appreciate Amazon's transparency here because they're one of the original pioneers of Serverless with Lambda functions. And nowadays, you have tons of platforms offering serverless services like Vercel and Netlify, which are actually just using and reselling AWS services Behind the scenes, there's almost an entire industry of startups that make AWS easier to use, including open source projects like the serverless framework and SST. But not Everyone is drinking the Kool Aid.

Like, DHH, the creator of Ruby on Rails and Basecamp, has been advocating for a majestic monolith for the last decade and took his entire company off the cloud after they Spent over $3,000,000 in 1 year. Now they just run their own servers. A lot of successful start ups like Dropbox end up leaving the cloud once they get big enough. However, I personally use serverless my projects, and it's an absolute game changer for getting things done quickly. Although, I have accidentally created a few infinitely scaling infinite loops That could have potentially cost me an infinite amount of money.

But what's the difference between a microservice and monolith architecture? At Prime Video, they needed a tool to analyze audio content or issues Like video freeze and corruption. To implement this tool, they use multiple serverless functions called step functions, which are basically the same thing as Lambda, to handle different responsibilities. You have an initial entry point, which kicks off another service to do a file conversion. That converts an audio video stream into frames that can be used by the detector.

You've got Uh, multiple detectors using machine learning to analyze the video. Then finally, you have another function to aggregate the results and store them in a bucket. But there's a little bit of overhead every time you data from one service to another. They need to serialize and deserialize data and communicate over a network. In this case, their service needed to run multiple Well, times for every second of a video stream, and they quickly hit a bottleneck with their account limits just trying to orchestrate the service.

In addition, By temporarily uploading files to s 3, they were burning through money just accessing these files in the buckets. They realized that the distributed architecture was the root cause of these bottlenecks, causing them to make a bold decision to rearchitect to a monolith. Instead of running decoupled distributed services, they took everything and made it run on a single All the components are the same, but now that they run on a single server, they can only scale vertically. That means to do more work, they'll need to make each server bigger, unlike the Microservice architecture, which could scale horizontally by creating more service for each individual component based on its scaling needs. That seems like it would be a drawback, but it eliminated All kinds of unnecessary communication and network usage that reduce their cost by 90%.

And for a product of this magnitude, that means 1,000,000 of dollars saved. So I guess the takeaway is that if you're Using microservices, you should probably cobble them together into a monolith right now. Well, not so fast. In this case, the optimization was pretty obvious. Famously, back in 2000 Netflix was based on a monolith architecture and had a massive failure that motivated them to break their architecture into 100 of different microservices that scale independently with Vault Tolerance.

It might be more complex and expensive, but if Netflix goes down for a few hours, it'll cost them way more money and lost memberships. Then for small businesses like me, I can easily deploy my shitty JavaScript code without ever having to think about infrastructure. I rarely even bust out of the free tier, and when I do, it's money well spent because I have peace of mind knowing that I'm not going to deploy some bad code to my monolith that takes down my entire operation. Ultimately, when it comes to cloud architecture, there are No solutions, only trade offs. This has been the CodeReport.

Thanks for watching, and I will see you in the next one.
It is May 6, 2023 and you're watching the Code Report. Serverless is the biggest lie in the history of computers. When you go serverless, you're still using a server, it's just not yours. You'll compute nothing and be happy. Amazon Prime Video just dropped a shocking article explaining how they Save 90% on their Amazon Web Services bill by switching from serverless microservices to an old fashioned monolith architecture. That's great news Amazon, because it'll save a ton of money, but bad news for Amazon, because it just lost a great revenue source. The article is sending shock waves through tech right now, because one of the main claims of the Serverless vision is that you can scale infrastructure more efficiently, which in theory should cost less money. I really appreciate Amazon's transparency here because they're one of the original pioneers of Serverless with Lambda functions. And nowadays, you have tons of platforms offering serverless services like Vercel and Netlify, which are actually just using and reselling AWS services Behind the scenes, there's almost an entire industry of startups that make AWS easier to use, including open source projects like the serverless framework and SST.
amazon
news
netflix
But not Everyone is drinking the Kool Aid. Like, DHH, the creator of Ruby on Rails and Basecamp, has been advocating for a majestic monolith for the last decade and took his entire company off the cloud after they Spent over $3,000,000 in 1 year. Now they just run their own servers. A lot of successful start ups like Dropbox end up leaving the cloud once they get big enough. However, I personally use serverless my projects, and it's an absolute game changer for getting things done quickly. Although, I have accidentally created a few infinitely scaling infinite loops That could have potentially cost me an infinite amount of money. But what's the difference between a microservice and monolith architecture? At Prime Video, they needed a tool to analyze audio content or issues Like video freeze and corruption. To implement this tool, they use multiple serverless functions called step functions, which are basically the same thing as Lambda, to handle different responsibilities. You have an initial entry point, which kicks off another service to do a file conversion.
That converts an audio video stream into frames that can be used by the detector. You've got Uh, multiple detectors using machine learning to analyze the video. Then finally, you have another function to aggregate the results and store them in a bucket. But there's a little bit of overhead every time you data from one service to another. They need to serialize and deserialize data and communicate over a network. In this case, their service needed to run multiple Well, times for every second of a video stream, and they quickly hit a bottleneck with their account limits just trying to orchestrate the service. In addition, By temporarily uploading files to s 3, they were burning through money just accessing these files in the buckets.
data management
data
databases
multimedia
streaming
visualization
video gaming
They realized that the distributed architecture was the root cause of these bottlenecks, causing them to make a bold decision to rearchitect to a monolith. Instead of running decoupled distributed services, they took everything and made it run on a single All the components are the same, but now that they run on a single server, they can only scale vertically. That means to do more work, they'll need to make each server bigger, unlike the Microservice architecture, which could scale horizontally by creating more service for each individual component based on its scaling needs.
That seems like it would be a drawback, but it eliminated All kinds of unnecessary communication and network usage that reduce their cost by 90%. And for a product of this magnitude, that means 1,000,000 of dollars saved. So I guess the takeaway is that if you're Using microservices, you should probably cobble them together into a monolith right now. Well, not so fast. In this case, the optimization was pretty obvious. Famously, back in 2000 Netflix was based on a monolith architecture and had a massive failure that motivated them to break their architecture into 100 of different microservices that scale independently with Vault Tolerance. It might be more complex and expensive, but if Netflix goes down for a few hours, it'll cost them way more money and lost memberships. Then for small businesses like me, I can easily deploy my shitty JavaScript code without ever having to think about infrastructure. I rarely even bust out of the free tier, and when I do, it's money well spent because I have peace of mind knowing that I'm not going to deploy some bad code to my monolith that takes down my entire operation.
netflix
telecommunications
Ultimately, when it comes to cloud architecture, there are No solutions, only trade offs. This has been the CodeReport. Thanks for watching, and I will see you in the next one.
architecture
software
It is May 6, 2023 and you're watching the Code Report. Serverless is the biggest lie in the history of computers. When you go serverless, you're still using a server, it's just not yours. You'll compute nothing and be happy. Amazon Prime Video just dropped a shocking article explaining how they Save 90% on their Amazon Web Services bill by switching from serverless microservices to an old fashioned monolith architecture. That's great news Amazon, because it'll save a ton of money, but bad news for Amazon, because it just lost a great revenue source. The article is sending shock waves through tech right now, because one of the main claims of the Serverless vision is that you can scale infrastructure more efficiently, which in theory should cost less money. I really appreciate Amazon's transparency here because they're one of the original pioneers of Serverless with Lambda functions. And nowadays, you have tons of platforms offering serverless services like Vercel and Netlify, which are actually just using and reselling AWS services Behind the scenes, there's almost an entire industry of startups that make AWS easier to use, including open source projects like the serverless framework and SST. But not Everyone is drinking the Kool Aid. Like, DHH, the creator of Ruby on Rails and Basecamp, has been advocating for a majestic monolith for the last decade and took his entire company off the cloud after they Spent over $3,000,000 in 1 year. Now they just run their own servers. A lot of successful start ups like Dropbox end up leaving the cloud once they get big enough. However, I personally use serverless my projects, and it's an absolute game changer for getting things done quickly. Although, I have accidentally created a few infinitely scaling infinite loops That could have potentially cost me an infinite amount of money. But what's the difference between a microservice and monolith architecture? At Prime Video, they needed a tool to analyze audio content or issues Like video freeze and corruption. To implement this tool, they use multiple serverless functions called step functions, which are basically the same thing as Lambda, to handle different responsibilities. You have an initial entry point, which kicks off another service to do a file conversion. That converts an audio video stream into frames that can be used by the detector. You've got Uh, multiple detectors using machine learning to analyze the video. Then finally, you have another function to aggregate the results and store them in a bucket. But there's a little bit of overhead every time you data from one service to another. They need to serialize and deserialize data and communicate over a network. In this case, their service needed to run multiple Well, times for every second of a video stream, and they quickly hit a bottleneck with their account limits just trying to orchestrate the service. In addition, By temporarily uploading files to s 3, they were burning through money just accessing these files in the buckets. They realized that the distributed architecture was the root cause of these bottlenecks, causing them to make a bold decision to rearchitect to a monolith. Instead of running decoupled distributed services, they took everything and made it run on a single All the components are the same, but now that they run on a single server, they can only scale vertically. That means to do more work, they'll need to make each server bigger, unlike the Microservice architecture, which could scale horizontally by creating more service for each individual component based on its scaling needs. That seems like it would be a drawback, but it eliminated All kinds of unnecessary communication and network usage that reduce their cost by 90%. And for a product of this magnitude, that means 1,000,000 of dollars saved. So I guess the takeaway is that if you're Using microservices, you should probably cobble them together into a monolith right now. Well, not so fast. In this case, the optimization was pretty obvious. Famously, back in 2000 Netflix was based on a monolith architecture and had a massive failure that motivated them to break their architecture into 100 of different microservices that scale independently with Vault Tolerance. It might be more complex and expensive, but if Netflix goes down for a few hours, it'll cost them way more money and lost memberships. Then for small businesses like me, I can easily deploy my shitty JavaScript code without ever having to think about infrastructure. I rarely even bust out of the free tier, and when I do, it's money well spent because I have peace of mind knowing that I'm not going to deploy some bad code to my monolith that takes down my entire operation. Ultimately, when it comes to cloud architecture, there are No solutions, only trade offs. This has been the CodeReport. Thanks for watching, and I will see you in the next one.
It
it
is
is
May
may
6,
6
2023
2023
and
and
you're
you're
watching
watching
the
the
Code
code
Report.
report
Serverless
serverless
is
is
the
the
biggest
biggest
lie
lie
in
in
the
the
history
history
of
of
computers.
computers
When
when
you
you
go
go
serverless,
serverless
you're
you're
still
still
using
using
a
a
server,
server
it's
it's
just
just
not
not
yours.
yours
You'll
you'll
compute
compute
nothing
nothing
and
and
be
be
happy.
happy
Amazon
amazon
Prime
prime
Video
video
just
just
dropped
dropped
a
a
shocking
shocking
article
article
explaining
explaining
how
how
they
they
Save
save
90%
90%
on
on
their
their
Amazon
amazon
Web
web
Services
services
bill
bill
by
by
switching
switching
from
from
serverless
serverless
microservices
microservices
to
to
an
an
old
old
fashioned
fashioned
monolith
monolith
architecture.
architecture
That's
that's
great
great
news
news
Amazon,
amazon
because
because
it'll
it'll
save
save
a
a
ton
ton
of
of
money,
money
but
but
bad
bad
news
news
for
for
Amazon,
amazon
because
because
it
it
just
just
lost
lost
a
a
great
great
revenue
revenue
source.
source
The
the
article
article
is
is
sending
sending
shock
shock
waves
waves
through
through
tech
tech
right
right
now,
now
because
because
one
one
of
of
the
the
main
main
claims
claims
of
of
the
the
Serverless
serverless
vision
vision
is
is
that
that
you
you
can
can
scale
scale
infrastructure
infrastructure
more
more
efficiently,
efficiently
which
which
in
in
theory
theory
should
should
cost
cost
less
less
money.
money
I
i
really
really
appreciate
appreciate
Amazon's
amazon's
transparency
transparency
here
here
because
because
they're
they're
one
one
of
of
the
the
original
original
pioneers
pioneers
of
of
Serverless
serverless
with
with
Lambda
lambda
functions.
functions
And
and
nowadays,
nowadays
you
you
have
have
tons
tons
of
of
platforms
platforms
offering
offering
serverless
serverless
services
services
like
like
Vercel
vercel
and
and
Netlify,
netlify
which
which
are
are
actually
actually
just
just
using
using
and
and
reselling
reselling
AWS
aws
services
services
Behind
behind
the
the
scenes,
scenes
there's
there's
almost
almost
an
an
entire
entire
industry
industry
of
of
startups
startups
that
that
make
make
AWS
aws
easier
easier
to
to
use,
use
including
including
open
open
source
source
projects
projects
like
like
the
the
serverless
serverless
framework
framework
and
and
SST.
sst
But
but
not
not
Everyone
everyone
is
is
drinking
drinking
the
the
Kool
kool
Aid.
aid
Like,
like
DHH,
dhh
the
the
creator
creator
of
of
Ruby
ruby
on
on
Rails
rails
and
and
Basecamp,
basecamp
has
has
been
been
advocating
advocating
for
for
a
a
majestic
majestic
monolith
monolith
for
for
the
the
last
last
decade
decade
and
and
took
took
his
his
entire
entire
company
company
off
off
the
the
cloud
cloud
after
after
they
they
Spent
spent
over
over
$3,000,000
$3,000,000
in
in
1
1
year.
year
Now
now
they
they
just
just
run
run
their
their
own
own
servers.
servers
A
a
lot
lot
of
of
successful
successful
start
start
ups
ups
like
like
Dropbox
dropbox
end
end
up
up
leaving
leaving
the
the
cloud
cloud
once
once
they
they
get
get
big
big
enough.
enough
However,
however
I
i
personally
personally
use
use
serverless
serverless
my
my
projects,
projects
and
and
it's
it's
an
an
absolute
absolute
game
game
changer
changer
for
for
getting
getting
things
things
done
done
quickly.
quickly
Although,
although
I
i
have
have
accidentally
accidentally
created
created
a
a
few
few
infinitely
infinitely
scaling
scaling
infinite
infinite
loops
loops
That
that
could
could
have
have
potentially
potentially
cost
cost
me
me
an
an
infinite
infinite
amount
amount
of
of
money.
money
But
but
what's
what's
the
the
difference
difference
between
between
a
a
microservice
microservice
and
and
monolith
monolith
architecture?
architecture
At
at
Prime
prime
Video,
video
they
they
needed
needed
a
a
tool
tool
to
to
analyze
analyze
audio
audio
content
content
or
or
issues
issues
Like
like
video
video
freeze
freeze
and
and
corruption.
corruption
To
to
implement
implement
this
this
tool,
tool
they
they
use
use
multiple
multiple
serverless
serverless
functions
functions
called
called
step
step
functions,
functions
which
which
are
are
basically
basically
the
the
same
same
thing
thing
as
as
Lambda,
lambda
to
to
handle
handle
different
different
responsibilities.
responsibilities
You
you
have
have
an
an
initial
initial
entry
entry
point,
point
which
which
kicks
kicks
off
off
another
another
service
service
to
to
do
do
a
a
file
file
conversion.
conversion
That
that
converts
converts
an
an
audio
audio
video
video
stream
stream
into
into
frames
frames
that
that
can
can
be
be
used
used
by
by
the
the
detector.
detector
You've
you've
got
got
Uh,
uh
multiple
multiple
detectors
detectors
using
using
machine
machine
learning
learning
to
to
analyze
analyze
the
the
video.
video
Then
then
finally,
finally
you
you
have
have
another
another
function
function
to
to
aggregate
aggregate
the
the
results
results
and
and
store
store
them
them
in
in
a
a
bucket.
bucket
But
but
there's
there's
a
a
little
little
bit
bit
of
of
overhead
overhead
every
every
time
time
you
you
data
data
from
from
one
one
service
service
to
to
another.
another
They
they
need
need
to
to
serialize
serialize
and
and
deserialize
deserialize
data
data
and
and
communicate
communicate
over
over
a
a
network.
network
In
in
this
this
case,
case
their
their
service
service
needed
needed
to
to
run
run
multiple
multiple
Well,
well
times
times
for
for
every
every
second
second
of
of
a
a
video
video
stream,
stream
and
and
they
they
quickly
quickly
hit
hit
a
a
bottleneck
bottleneck
with
with
their
their
account
account
limits
limits
just
just
trying
trying
to
to
orchestrate
orchestrate
the
the
service.
service
In
in
addition,
addition
By
by
temporarily
temporarily
uploading
uploading
files
files
to
to
s
s
3,
3
they
they
were
were
burning
burning
through
through
money
money
just
just
accessing
accessing
these
these
files
files
in
in
the
the
buckets.
buckets
They
they
realized
realized
that
that
the
the
distributed
distributed
architecture
architecture
was
was
the
the
root
root
cause
cause
of
of
these
these
bottlenecks,
bottlenecks
causing
causing
them
them
to
to
make
make
a
a
bold
bold
decision
decision
to
to
rearchitect
rearchitect
to
to
a
a
monolith.
monolith
Instead
instead
of
of
running
running
decoupled
decoupled
distributed
distributed
services,
services
they
they
took
took
everything
everything
and
and
made
made
it
it
run
run
on
on
a
a
single
single
All
all
the
the
components
components
are
are
the
the
same,
same
but
but
now
now
that
that
they
they
run
run
on
on
a
a
single
single
server,
server
they
they
can
can
only
only
scale
scale
vertically.
vertically
That
that
means
means
to
to
do
do
more
more
work,
work
they'll
they'll
need
need
to
to
make
make
each
each
server
server
bigger,
bigger
unlike
unlike
the
the
Microservice
microservice
architecture,
architecture
which
which
could
could
scale
scale
horizontally
horizontally
by
by
creating
creating
more
more
service
service
for
for
each
each
individual
individual
component
component
based
based
on
on
its
its
scaling
scaling
needs.
needs
That
that
seems
seems
like
like
it
it
would
would
be
be
a
a
drawback,
drawback
but
but
it
it
eliminated
eliminated
All
all
kinds
kinds
of
of
unnecessary
unnecessary
communication
communication
and
and
network
network
usage
usage
that
that
reduce
reduce
their
their
cost
cost
by
by
90%.
90%
And
and
for
for
a
a
product
product
of
of
this
this
magnitude,
magnitude
that
that
means
means
1,000,000
1,000,000
of
of
dollars
dollars
saved.
saved
So
so
I
i
guess
guess
the
the
takeaway
takeaway
is
is
that
that
if
if
you're
you're
Using
using
microservices,
microservices
you
you
should
should
probably
probably
cobble
cobble
them
them
together
together
into
into
a
a
monolith
monolith
right
right
now.
now
Well,
well
not
not
so
so
fast.
fast
In
in
this
this
case,
case
the
the
optimization
optimization
was
was
pretty
pretty
obvious.
obvious
Famously,
famously
back
back
in
in
2000
2000
Netflix
netflix
was
was
based
based
on
on
a
a
monolith
monolith
architecture
architecture
and
and
had
had
a
a
massive
massive
failure
failure
that
that
motivated
motivated
them
them
to
to
break
break
their
their
architecture
architecture
into
into
100
100
of
of
different
different
microservices
microservices
that
that
scale
scale
independently
independently
with
with
Vault
vault
Tolerance.
tolerance
It
it
might
might
be
be
more
more
complex
complex
and
and
expensive,
expensive
but
but
if
if
Netflix
netflix
goes
goes
down
down
for
for
a
a
few
few
hours,
hours
it'll
it'll
cost
cost
them
them
way
way
more
more
money
money
and
and
lost
lost
memberships.
memberships
Then
then
for
for
small
small
businesses
businesses
like
like
me,
me
I
i
can
can
easily
easily
deploy
deploy
my
my
shitty
shitty
JavaScript
javascript
code
code
without
without
ever
ever
having
having
to
to
think
think
about
about
infrastructure.
infrastructure
I
i
rarely
rarely
even
even
bust
bust
out
out
of
of
the
the
free
free
tier,
tier
and
and
when
when
I
i
do,
do
it's
it's
money
money
well
well
spent
spent
because
because
I
i
have
have
peace
peace
of
of
mind
mind
knowing
knowing
that
that
I'm
i'm
not
not
going
going
to
to
deploy
deploy
some
some
bad
bad
code
code
to
to
my
my
monolith
monolith
that
that
takes
takes
down
down
my
my
entire
entire
operation.
operation
Ultimately,
ultimately
when
when
it
it
comes
comes
to
to
cloud
cloud
architecture,
architecture
there
there
are
are
No
no
solutions,
solutions
only
only
trade
trade
offs.
offs
This
this
has
has
been
been
the
the
CodeReport.
codereport
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
In this transcript, a speaker discusses the benefits of serverless computing, including cost savings and efficiency. They also discuss the challenges of scaling infrastructure and the benefits of using microservices instead of monolith architecture. The speaker emphasizes the need for efficient architecture and the potential for scale in the future.
Serverless was a big mistake... says Amazon
It is May 6, 2023 and you're watching the Code Report. Serverless is the biggest lie in the history of computers. When you go serverless, you're still using a server, it's just not yours. You'll compute nothing and be happy. Amazon Prime Video just dropped a shocking article explaining how they Save 90% on their Amazon Web Services bill by switching from serverless microservices to an old fashioned monolith architecture. That's great news Amazon, because it'll save a ton of money, but bad news for Amazon, because it just lost a great revenue source. The article is sending shock waves through tech right now, because one of the main claims of the Serverless vision is that you can scale infrastructure more efficiently, which in theory should cost less money. I really appreciate Amazon's transparency here because they're one of the original pioneers of Serverless with Lambda functions. And nowadays, you have tons of platforms offering serverless services like Vercel and Netlify, which are actually just using and reselling AWS services Behind the scenes, there's almost an entire industry of startups that make AWS easier to use, including open source projects like the serverless framework and SST. But not Everyone is drinking the Kool Aid. Like, DHH, the creator of Ruby on Rails and Basecamp, has been advocating for a majestic monolith for the last decade and took his entire company off the cloud after they Spent over $3,000,000 in 1 year. Now they just run their own servers. A lot of successful start ups like Dropbox end up leaving the cloud once they get big enough. However, I personally use serverless my projects, and it's an absolute game changer for getting things done quickly. Although, I have accidentally created a few infinitely scaling infinite loops That could have potentially cost me an infinite amount of money. But what's the difference between a microservice and monolith architecture? At Prime Video, they needed a tool to analyze audio content or issues Like video freeze and corruption. To implement this tool, they use multiple serverless functions called step functions, which are basically the same thing as Lambda, to handle different responsibilities. You have an initial entry point, which kicks off another service to do a file conversion. That converts an audio video stream into frames that can be used by the detector. You've got Uh, multiple detectors using machine learning to analyze the video. Then finally, you have another function to aggregate the results and store them in a bucket. But there's a little bit of overhead every time you data from one service to another. They need to serialize and deserialize data and communicate over a network. In this case, their service needed to run multiple Well, times for every second of a video stream, and they quickly hit a bottleneck with their account limits just trying to orchestrate the service. In addition, By temporarily uploading files to s 3, they were burning through money just accessing these files in the buckets. They realized that the distributed architecture was the root cause of these bottlenecks, causing them to make a bold decision to rearchitect to a monolith. Instead of running decoupled distributed services, they took everything and made it run on a single All the components are the same, but now that they run on a single server, they can only scale vertically. That means to do more work, they'll need to make each server bigger, unlike the Microservice architecture, which could scale horizontally by creating more service for each individual component based on its scaling needs. That seems like it would be a drawback, but it eliminated All kinds of unnecessary communication and network usage that reduce their cost by 90%. And for a product of this magnitude, that means 1,000,000 of dollars saved. So I guess the takeaway is that if you're Using microservices, you should probably cobble them together into a monolith right now. Well, not so fast. In this case, the optimization was pretty obvious. Famously, back in 2000 Netflix was based on a monolith architecture and had a massive failure that motivated them to break their architecture into 100 of different microservices that scale independently with Vault Tolerance. It might be more complex and expensive, but if Netflix goes down for a few hours, it'll cost them way more money and lost memberships. Then for small businesses like me, I can easily deploy my shitty JavaScript code without ever having to think about infrastructure. I rarely even bust out of the free tier, and when I do, it's money well spent because I have peace of mind knowing that I'm not going to deploy some bad code to my monolith that takes down my entire operation. Ultimately, when it comes to cloud architecture, there are No solutions, only trade offs. This has been the CodeReport. Thanks for watching, and I will see you in the next one.
In this transcript, a speaker discusses the benefits of serverless computing, including cost savings and efficiency. They also discuss the challenges of scaling infrastructure and the benefits of using microservices instead of monolith architecture. The speaker emphasizes the need for efficient architecture and the potential for scale in the future.