LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-01-2013, 07:46 PM   #1
elememental
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
Set up multiple server instances


I am using Ubuntu server 12.04 and I want to run multiple instances of Stratum mining proxy and use HAProxy to distribute the load.

My main question is, how can I create multiple instances of the server software(Stratum mining proxy) on my machine?

Since this is my first time doing something like this, am I correct in assuming that: I simply have to create multiple instances of Stratum mining proxy with different ports on the same IP and then use HAProxy to distribute the load over those ports?

Thanks in advance!


EDIT: Just to be clear, its less about the actual software and more about how it is possible to run multiple instances of server software on one machine. This software could be anything (for example a Minecraft server).

Last edited by elememental; 08-02-2013 at 08:13 PM.
 
Old 08-03-2013, 06:58 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by elememental View Post
EDIT: Just to be clear, its less about the actual software and more about how it is possible to run multiple instances of server software on one machine. This software could be anything (for example a Minecraft server).
In that case you would check what configuration changes (network ports, PID files, log / cache directories, etc, etc) and resources (CPU, RAM, storage) the process needs. Common services come with (example) configuration files to copy and edit, some only have command line args and some need none. In your case you'll read its documentation and run 'mining_proxy.py --help' to start with.
 
1 members found this post helpful.
Old 08-03-2013, 07:28 AM   #3
elememental
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
In that case you would check what configuration changes (network ports, PID files, log / cache directories, etc, etc) and resources (CPU, RAM, storage) the process needs. Common services come with (example) configuration files to copy and edit, some only have command line args and some need none. In your case you'll read its documentation and run 'mining_proxy.py --help' to start with.
I understand how to change the network ports, but how can I run multiple instances (Should I for example use Screen to create multiple sessions on which I could create one instance each?)
I'm sorry if this is a stupid question, I'm fairly new to Linux
 
Old 08-03-2013, 08:46 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Commonly daemons run in the background so executing the app with the right args should clear the terminal to run another one. So you would only use screen sessions for daemons that don't background themselves properly or processes that don't expect to be run in the background.
 
1 members found this post helpful.
Old 08-03-2013, 09:12 AM   #5
elememental
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Commonly daemons run in the background so executing the app with the right args should clear the terminal to run another one. So you would only use screen sessions for daemons that don't background themselves properly or processes that don't expect to be run in the background.
Wow that cleared a lot! (looking back I should have probably posted this in the beginner section)
This particular software doesn't have a daemon option, so I guess I'll either have to code it or use screens!
Thanks a million!
 
Old 08-03-2013, 09:19 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by elememental View Post
This particular software doesn't have a daemon option, so I guess I'll either have to code it or use screens!
Kind of depends on if you can decipher the actual command it runs in the end (see with say 'ps axf' or 'pgrep -lf python' if it actually runs a Python process) and if that process doesn't require a terminal. If both conditions can be matched then you can try running the final command from the command line (always good wrt catching errors):
Code:
/path/to/application --whatever-args --you-need
then try to background it and see if it still runs (ps / pgrep):
Code:
/path/to/application --whatever-args --you-need &
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Multiple Instances of Squid on One Server sjfast911 Linux - Newbie 7 08-23-2012 11:51 AM
Multiple instances of apache on one physical server - Config lnx_2011 Linux - Newbie 1 04-03-2011 02:54 AM
LXer: Running Multiple MySQL Server Instances in Parallel on a Linux Server LXer Syndicated Linux News 0 10-11-2010 12:00 PM
Starting multiple instances of X server armandino Linux - General 2 07-04-2007 02:41 AM
Samba, multiple server instances crispyleif Linux - Software 2 04-03-2006 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration