# Start worker only on first instance

**URL:** <https://community.fly.io/t/start-worker-only-on-first-instance/3476>\
**Category:** General\
**Tags:** elixir\
**Created:** [December 21, 2021, 5:27pm UTC](https://community.fly.io/t/start-worker-only-on-first-instance/3476 "2021-12-21T17:27:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [December 21, 2021, 11:35pm UTC](https://community.fly.io/t/start-worker-only-on-first-instance/3476/2 "2021-12-21T23:35:02Z")

</div>

This is an interesting problem. In the Rails world, you’d do this with two `[processes]`: [Preview: multi process apps (get your workers here!)](https://community.fly.io/t/preview-multi-process-apps-get-your-workers-here/2316)

That would probably work for your Elixir app too.

You could use postgres to elect a “leader” VM, but it’d take some work.

---

_[View the full topic](https://community.fly.io/t/start-worker-only-on-first-instance/3476)._
