Does Machine refer to Volume?

Hi, Fly.io !!

Please let me know if my interpretation is correct.

I am talking about the Add Volume Storage documentation.

In the following sentence, “The way to do this is to run at least two Machines per app.”, does machine refer to a volume?

The first rule of Fly Volumes is: Always run at least two volumes per application. The way to do this is to run at least two Machines per app. Also note that volumes don’t sync up by themselves; your app needs to take care of that. Refer to Fly Volumes for details about how volumes work.

Hi @shirotamaki

A Machine is like a VM on Fly.io. Every volume is attached to only one Machine, so to have 2 volumes you would need 2 Machines.

You might find the Volumes Reference docs helpful in understanding more about this:

3 Likes

Thank you @andie !!

When I try the fly status command, there are two machines present.

❯ fly status
App
  Name     = hogehoge-backend
  Owner    = personal
  Hostname = hogehoge-backend.fly.dev
  Image    = hogehoge-backend:deployment-hogehogehoge
  Platform = machines

Machines
PROCESS	ID            	VERSION	REGION	STATE  	CHECKS	LAST UPDATED
app    	1111111111	3      	nrt   	stopped	      	2023-06-04T14:24:14Z
app    	1111111111	3      	nrt   	stopped	      	2023-06-04T14:23:1

However, when I check the dashboard, there are not two.

Can’t I see the machine on the dashboard?

Yes! You can see all your Machines by clicking on Machines in the left menu from the main dashboard page.

Or you can click on one of your apps, like xxxx-backend, and then click Machines in the left menu to see the Machines only for that app.

2 Likes

Wow !! I see !!!

I can check it.
But I don’t remember creating a VM, is this something that can be done on its own when I create an app?

1 Like

Yes, your app on Fly.io consists of one or more Machines that are running your code. The first time you deploy your app, we create two Machines by default for redundancy.

2 Likes

I understood !
Thank you for your instruction :sparkles::sparkles::sparkles:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.