[EN] The fastest way to bootstrap Ruby on Rails / Uchio KONDO @udzura

[EN] The fastest way to bootstrap Ruby on Rails / Uchio KONDO @udzura



Ruby on Rails applications sometimes take too long time in bootstrapping, especially when the application is complicated, monolithic or “legacy” one. This inhibits Kubernetes or other orchestrators to do smooth autoscaling. There are technologies such as bootsnap to solve this problem. In addition to them, I propose new strategy – “checkpoint and restore”. I used CRIU(Checkpoint and Restore In Userspace) in Linux environment to make “ahead of time” process dump, and boot the application from image to reduce the bootstrap time. In my case, observed bootstrap time is reduced from about 2,500ms to 1,200ms. I will describe what the CRIU is in the first place, use cases where CRIU is effective and some problems using CRIU.

RubyKaigi 2019

Leave a Reply

Your email address will not be published. Required fields are marked *