Awesome JavaScript microservices in the cloud for (almost free)

20
Awesome JS microservices in the cloud for (almost) free @gojkoadzic https://gojko.net

Transcript of Awesome JavaScript microservices in the cloud for (almost free)

Awesome JSmicroservices

in the cloud for (almost) free

@gojkoadzichttps://gojko.net

Cloud functions are the mostrevolutionary improvement in

clouds since EC2

1 B.C.

Icons by Flaticon

1 B.C.

Icons by Flaticon

No matter how good I canbecome at (dev)ops, Amazon*

can do it way better...

* Google, Microsoft...

1 A.D.

Icons by Flaticon

FILES

2 A.D.

Icons by Flaticon

VMs

2 A.D.

Icons by Flaticon

Assets

5 A.D.

Icons by Flaticon

Apps

7 A.D.

Icons by Flaticon

10 A.D.

Icons by Flaticon

Apis

10 A.D.

Icons by Flaticon

financial incentive to keepmodules small, isolated and

loosely coupled

Lambda is almost free● $0.0000002 per request● $0.000000834 for 100ms @ 512MB● First 1 million requests per month are free

execution on tap

● No need to keep spare capacity● No need to worry about failover● Pay per actual usage

code with batteries included● Provisioning + Control● Monitoring● Task dispatching● Balancing● Scaling

trigger with almost anything● File uploads (S3)● DB records added (Dynamo)● Events in stream (Kinesis, CloudWatch)● Workflows (CodeDeploy, SWF, CloudWatch Rules)● Scheduled tasks (CloudWatch Events)● Message queues (SNS)● Web requests (APIGateway)

twin business + tech impact● Ops by magic● Multi-versioning out of the box● Small, isolated modules● Remove a lot of infrastructure code● Testability becomes a challenge

functions, not services● Five minutes or bust● Share nothing● No sessions● No streams● Full utilization = 4-5x dedicated VM price

configuration is … problematic● claudiajs.com● serverless.com● apex.run