2

I have a 3rd party application. Basically I need to run one instance of that application for a one user. For 10 users I have to run 10 instances. From my API I want to communicate with a specific client based on API parameters. Please check the attached image.

enter image description here

I have two methods and each have some issues.

1. using multiple ports

I can record port number in a database and forward API data to specific instance. For example localhost/instances:4501;

Issues is it's not scalable as there is a limit in port addresses. Also identifying usable ports is another challenge without interface with other applications.

2. Using docker network

with this approach I don't need to assign ports , I can just name containers as instance1,intance2 and can forward traffic to specific instance. How ever with this approach I cannot run application with docker. I want to run my application without docker as well.

Which approach is better? And is there any other best way to achieve this? thank you

asked Jan 11, 2021 at 14:16
6
  • Do your API and Clients communicate over http? Commented Jan 12, 2021 at 7:42
  • @Darem Both api and clients exist in the server .Yes I'm using http internal api to communicate with clients.for example http/localhost:portofclientA or http/clientA using docker network Commented Jan 12, 2021 at 7:47
  • And your "application" runs without docker and your clients/instances are docker container? Commented Jan 12, 2021 at 7:53
  • @Darem i have 2 ways to do.i'm trying to find the best way or another method. I use docker containers and docker network also i used applications without docker and used ports communicate so different clients has different ports. Commented Jan 12, 2021 at 7:56
  • Ok I´m a little bit confused by this sentence "How ever with this approach I cannot run application with docker. I want to run my application without docker as well." Commented Jan 12, 2021 at 7:57

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.