Home > Back-end >  How is heroku's dyno implemented? (e.g. one dyno = one core CPU in AWS?)
How is heroku's dyno implemented? (e.g. one dyno = one core CPU in AWS?)

Time:12-17

I am studying PAAS archtecture, and found heroku's dyno looks very similar with IAAS's CPU:

  • 1 dyno looks very like a 1 core CPU
  • can run docker/k8s
  • can show metrics like CPU usage , like 30% usage
  • can scale from 1 to 10, very like virtual-machine or virtual CPU

so I want to know,

  1. how does heroku implement a dyno?(e.g. is a dyno simplely equals to a docker?)
  2. how do they get the metrics of a dyno?

CodePudding user response:

1 dyno ~= 1 core cpu docker

I spent several hours read the documents about the open sourced PAAS, like dokku, and I believe this kind of container is based on docker.

1 container in PASS ~= 1 docker

so,

1 poor dyno ~= 1 core cpu 512MB mem docker

1 strong dyno ~= 16 core cpu 32G mem docker

thanks to the docker's API, you can change its config dynamically. Also you can monitor/metric your dyno , such as: CPU /memory/network/disk usage.

You can implement your own dyno in minutes. that's it.

refer to:

https://docs.docker.com/engine/api/

https://dokku.com/

  • Related