# To Thread or Not to Thread: An In-Depth Look at Ruby's Execution Models

DevFeed: [To Thread or Not to Thread: An In-Depth Look at Ruby's Execution Models](<https://devfeed.tech/articles/to-thread-or-not-to-thread-an-in-depth-look-at-ruby-s-execution-models-1555.md>)

Original publisher: [Read original article](<https://shopify.engineering/ruby-execution-models>)

Author: Jean Boussier

Published: 2022-05-31T14:00:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Sidekiq](<https://devfeed.tech/topics/sidekiq.md>), [Heroku](<https://devfeed.tech/topics/heroku.md>)

Tags: [heroku](<https://devfeed.tech/tags/heroku.md>), [processes](<https://devfeed.tech/tags/processes.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [sidekiq](<https://devfeed.tech/tags/sidekiq.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threads](<https://devfeed.tech/tags/threads.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

## AI overview

This article examines threaded servers and processes in Ruby web applications. It explains why threads are a popular default, compares their throughput and memory characteristics with processes, and discusses static and request-processing memory, garbage collection, and Copy on Write.

## Source excerpt

An in-depth look at threads vs processes in Ruby web applications, and when you should use each.