user366312
user366312

Reputation: 16894

How can I have multiple localhosts in a machine?

Suppose, I want to test two server applications and one client application such that if one of the servers fail, the client can still be connected to the second server without the interruption of a task.

In order to do that, I need two localhost addresses so that each server can expose one endpoint to to the incoming clients.

How can I achieve that in a laptop?

Some suggests using Virtual Machines with Internal Networking. But, my PC can't take the memory load of two virtual machines running simultaneously.

Any suggestion?

Upvotes: 1

Views: 1208

Answers (2)

Abhinav
Abhinav

Reputation: 164

While using servers like Tomcat, Jboss, etc. You can make separate instances and bind separate ports using configuration (mostly xml ) files.

Upvotes: 0

Owen Pauling
Owen Pauling

Reputation: 11841

Run the servers on different ports.

Upvotes: 9

Related Questions