What is the instance (copy) of the application?

Could not find a concrete explanation of what this means in practice.
Previously I thought that this is, roughly speaking, the running server (e.g. puma) or area in memory that runs code that handles requests.
Then why say that running multiple instances of the application?
In the context of rails which is responsible for working with the instance of the application?
June 14th 19 at 21:00
3 answers
June 14th 19 at 21:02
Here you have a controller that handles incoming requests. For each request it receives from the settings instance variable like "@var". Its value is unique for each request. So the application executes the same code but for different incoming data.
By default your server settings, queries are queued and executed sequentially. But if the load begins to exceed the capabilities of this solution, you can start to run the application on multiple instances. This implies the execution of one and the same code in multiple processes (sorcery) or even on different servers.
Example: a load distributing server (1 server) separates the queries on several instances (n servers) running the same application, but they all refer to one database (1 server).
June 14th 19 at 21:04
The instance is a anglicism "Instance", in the context of programming translates as "an instance of an object". For example we have Notepad window is single instance application "Notepad" or single instance launched another Notepad - get two copies. Similarly with any other objects.
here it confuses me, I also thought that it is running the application (i.e. puma in my case), but in some materials the meaning does not fit this definition. - Joany22 commented on June 14th 19 at 21:07
This was just one example. Here is an example of two: there's an app-server, it starts up and listens on a particular port when the port receives a message it processes it, the application can start multiple its instances for the number of processor cores to distribute the load. I.e., on the outside we see one application, but in fact the server is running multiple instances of the application. Or here's another example: in the OS running a lot of programs, every program is an instance of the object type "process". - Jacky commented on June 14th 19 at 21:10
, Everything is even simpler. Pay attention to the way the chrome browser. Visually it is one program, but really it's a bunch of instances, where each busy with his business. - abigail36 commented on June 14th 19 at 21:13
June 14th 19 at 21:06
Well applicable to local development:
rails s-p 3001 -P tmp/pids/server1.pid this is the first instant
rails s-p 3002-P tmp/pids/server2.pid is the second instant

Probably meant a separate server application is one of instant.
and the production is launched puma say? - Joany22 commented on June 14th 19 at 21:09
Need a context. - Jacky commented on June 14th 19 at 21:12

Find more questions by tags RubyRuby on RailsWeb Development