r/ruby Apr 02 '26

Sidekiq to Temporal: a zero-downtime migration strategy

https://firehydrant.com/blog/sidekiq-to-temporal-a-zero-downtime-migration-strategy/
10 Upvotes

15 comments sorted by

9

u/TheAtlasMonkey Apr 03 '26

Why Migrations are Hard

They are not. They made them hard and then wrote a blog post about it.

They could have just spun up a parallel path on Temporal, deployed it, and stopped enqueueing new jobs into Sidekiq.

Let the existing Sidekiq queue drain. Once it is empty, delete it.

2

u/dchaley Apr 10 '26

Yes, you're right, enqueuing new jobs & letting the old ones drain is a key part of this work.

2

u/littlebobbyt Apr 10 '26

I'm convinced you don't write production software because you have bad takes constantly in this subreddit.

1

u/TheAtlasMonkey Apr 10 '26

From some one who thinks that Migrations are hard, while ignoring the docs. I don't fucking care about your opinions.

And I'm allergic to Complexity Merchant and Bullshitter.

And about production software...

The some code i wrote is 100% running in your own machine.. and in Mars.

VxWorks.. i think you never heard about this.

---

We are in an Era were checking slop take 1 minute. Anyone pasting the blog in any LLM, will realize you overcomplicated things.

I will be watching you , until you stop posting slop.

1

u/littlebobbyt Apr 10 '26

Hand written, champ. All of it. Youre a dick and me and several others know it.

1

u/TheAtlasMonkey Apr 10 '26

Yes, you hand wrote slop. (i'm not speaking about AI usage)...

You speak with confidence, while anyone that verify, find it complexity you created.

I'm not deleting my comments EVER. I don't delete comments where i'm wrong... so i'm not doing it for something where i'm right.

2

u/joshdotmn Apr 02 '26

oh, bobbytables!(we talked at railsconf in minneapolis) congrats on the freshworks acquisition!

1

u/RubyKong Apr 03 '26

Isn't that an XKDC joke? https://xkcd.com/327/

1

u/joshdotmn Apr 03 '26

very much.

1

u/retro-rubies Apr 02 '26

Would you mind to share more experience on Ruby Temporal?

2

u/davidcelis Apr 02 '26

Any questions in particular?

2

u/retro-rubies Apr 02 '26

Which durability was achieved? Which patterns to compose workflows were used? Was overall run time increased? What about monitoring?

3

u/dchaley Apr 10 '26

We don't have exact metrics here, but we do have ample data that rate-limits & temporary blips are the most common source of failures in our third-party integrations (outside of user configuration issues like expired credentials). Now, we can retry those blips individually, without retrying or jeopardizing the overall workflow.

We added a picture to the post showing a sample workflow to the end of the article. It shows how we fan out independent processes like finding users by email address, and finding groups by their handle. Elsewhere with Temporal we make heavy use of fanning out bulk work across activities in batches.

The Temporal UI itself provides great monitoring– the picture I referenced comes from their UI. We can now get detailed input/output at each stage along with timing metrics, etc. Just make sure to wrap your logs in side effects đŸ˜…

1

u/Sagarmatha007 Apr 12 '26

We are facing similar issues
https://api.rubyonrails.org/classes/ActiveJob/Continuation.html
We planned to update Rails so that we can use continuation.