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 04-23-2019, 10:02 PM   #1
mmhs
Member
 
Registered: Oct 2010
Posts: 101

Rep: Reputation: 1
cluster a custom application


Hi guys.
I have a custom application which is written by java. I want to know is it possible to cluster this application by pacemaker. For example copy this application in two different nodes and setup a cluster by pacemaker. In one time only one application work and when primary node goes down my application start to work on second node in simple word i need a way to cluster my simple application like clustering nginx server with packemaker,

And also is there any solution to cluster two OS. If first OS goes down second OS start to serve request ?

Thanks in advance

Last edited by mmhs; 04-24-2019 at 06:37 AM.
 
Old 04-24-2019, 07:30 AM   #2
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled
It is easy to get into the weeds with clustering.

Quote:
Originally Posted by mmhs View Post
I have a custom application which is written by java. I want to know is it possible to cluster this application by pacemaker. For example copy this application in two different nodes and setup a cluster by pacemaker. In one time only one application work and when primary node goes down my application start to work on second node in simple word i need a way to cluster my simple application like clustering nginx server with packemaker,
This is flirting with becoming a case of the XY Problem. You probably can use pacemaker, but it depends. Pacemaker may or may not be the answer. Will your application ever run on FreeBSD, Solaris, AIX, Windows, etc? Clustering comes in two forms. One is known as scalable clustering, where work loads are distributed between nodes. The second is high availability clustering, where a failure doesn't cause a service outage. It sounds like you want HA.

Some questions that should point you in the right direction:

Are others going to be supporting this application? Your sysads might have a clustering tech they are already using. If they are using for example Solaris Cluster or Service Guard, I doubt they want to deal with pacemaker. I would focus on making it able to run in a cluster in general rather than worrying about a specific tech. If it is something that is going to run on an appliance, then use whatever cluster tech you like.

Does your application use storage or a database? Is this data changing? Where is it stored? Changing data adds considerable complexity to a cluster. It might be best to say not my problem and let a DBMS, LDAP directory, reddis, etc handle it. If others will be supporting it, try to keep things standard so for instance, a MSSQL shop isn't stuck dealing with MariaDB or vice versa. Ditto with AD vs OpenLDAP. LDAP is usually a client side failover. DBMS is usually a server side failover, so you will need to be able to fail over the VIP(s).

Are user sessions a problem? Failing over between hosts with no sessions is easy. Adding user sessions makes things a little more challenging, but still doable. How you do it depends on where the sessions persist. If so, is your application running on something like Tomcat or is it a standalone Java application? If not, have you considered it? Java application servers generally have session peering abilities that aid in clustering. If user sessions aren't a problem, the easiest thing to do would be to not worry about clustering. Let the sysads deal with it. If it is for an appliance, you just need to worry about failing over the VIP(s).

Quote:
Originally Posted by mmhs View Post
And also is there any solution to cluster two OS. If first OS goes down second OS start to serve request ?
Yes. If your application is a network server, reverse proxies, such as HAProxy, can do this.

Hopefully this helps.
 
Old 04-26-2019, 01:40 AM   #3
mmhs
Member
 
Registered: Oct 2010
Posts: 101

Original Poster
Rep: Reputation: 1
Thanks for your reply and information.
My application is a java application which gather information from servers and then sends to another server. From one side it initiates connection and from other side it receiver request. it does not need shared storage and database.


*************(floating IP)************
| *** route all traffic on every port ***|
| **************************************|
ServerA*************************** ServerB
(APP) **************************(Stopped App)

for more information I want to deploy application on physical servers and I cannot use virtualization and VM. Furthermore methods like Vmware FT has some limitations like max no of VCPU and also RAM. I think it should be much easier if I can use pacemaker as a cluster resource manager but I dont know how to introduce my application as a resource and how to route all traffic to my primary server and when server or application goes down traffic and requests route to other node.

Unfortunately my application is not like a service. normally my application gathers information from different servers and sends them to another servers thus methods like loadbalancer is not suitable for my scenario.

I need a floating IP for my cluster and when serverA goes down All traffic switch to ServerB( Input and Output) also cluster start Stopped application on serverB. And when ServerA backs online all requests (Input or Output ) route to ServerA and Stop App on ServerB.
 
  


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
LXer: Penguin Computing's Scyld ClusterWare(TM) HPC Offers Enhanced High Availability and Most Advanced Linux Cluster Virtualization, Enabling Broader Cluster Use LXer Syndicated Linux News 0 04-06-2006 06:03 PM
Cluster question: Is it possible to make a bulletproof cluster? ValidiusMaximus Linux - Software 1 09-06-2005 02:07 PM
To cluster or not to cluster engnet Linux - Hardware 1 06-25-2005 09:24 PM
Setting up a cluster with pxe and cluster knoppix bucovaina78 Linux - Networking 1 05-15-2005 11:29 PM
me wants cluster me wants cluster me wants cluster funkymunky Linux - Networking 3 01-06-2004 07:51 AM

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

All times are GMT -5. The time now is 12:48 AM.

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