Warming automation
Scheduled
Event
λ Only effective for non-
concurrent execution!
4 minute
interval
http://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html
Slide 23
Slide 23 text
Sending cold start events to analytics
λ
console.log(coldStart)
Logs λ
POST to Event DB
(Insights)
CloudWatch
Log Filter Trigger
Slide 24
Slide 24 text
Cold Starts Visualized
~7 hrs ~8 hrs
Slide 25
Slide 25 text
λ Host Uptime
Cold starts happen when hosts change!
~8hrs
Slide 26
Slide 26 text
λ Host Subnet Hopping
10.13
10.12 10.11 10.13 10.12 10.12 10.12
10.
11
# of AZs in us-west-2: 3
Slide 27
Slide 27 text
What's the maximum concurrency of your function?
one > 1
A scheduled event
will warm it
until host retires.
More advanced
strategy needed*
Slide 28
Slide 28 text
"Advanced" Strategy
for i in `seq 1 $NUM_EXECUTIONS`;
do
echo "[$i] Executing $AWS_LAMBDA_FUNCTION_NAME..."
aws lambda invoke ...
done
https://gist.github.com/smithclay/e89dfe35fe2a4938db56bb12df76777c
Slide 29
Slide 29 text
Multiple containers running on a
single host to serve parallel requests
Tracking /proc/sys/kernel/random/boot_id and hostname
Confirmed: cold start happens on container init.
Slide 30
Slide 30 text
So is this just a container PaaS?
High-availability/multiple zones
Elastic fleet of compute-optimized VMs
A very good scheduling algorithm
Design (freezing, limits, etc) for very fast invocation
Only if your PaaS has...
Slide 31
Slide 31 text
FaaS in Production Reality
λ λ
Dev Prod
Orchestration (!?)
Version/Deploy
Monitoring
Security
Cold Start Mgmt
The "learning
cliff"
Great tweet from @mfdii
Slide 32
Slide 32 text
FaaS Isn't a Silver Bullet
"I've got a fast, computationally-intensive task that I need to
perform occasionally in response to a well-defined event that
isn't that sensitive to latency."
—The Ideal FaaS Developer
// TO DO:
measure &&
share results