Cluster a custom application


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Cluster a custom application
# 1  
Old 04-24-2019
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
# 2  
Old 04-24-2019
High Availibility with Active/Passive Scenario should not be that hard. Clustering different Systems("OS") that way is also possible.

One major point is data storage. Most applications store data and thus this data needs to be shared between both systems. Either with a shared network storage, which has to be HA-enabled too or with a replication technology like drbd(aka "shared nothing") which is replicating the data in realtime.

In Front of your two application servers you may have a loadbalancer, which of course should also be HA-enabled.

All this could be done with pacemaker.

Last edited by hicksd8; 04-24-2019 at 11:20 AM..
This User Gave Thanks to stomp For This Post:
# 3  
Old 04-24-2019
thanks for your reply.
But I have a big problem. my application does not act like service ( port , init , systemd ). it's an application which is process some messages and send request to another server thus i can't use load balancer in front of my service. I want to know is there any solution to HA my application with pacemaker or other tools. because I dont know is there any resource for custom application.
# 4  
Old 04-25-2019
Well if your application is not a service, that other clients can send requests to, then a loadbalancer is just not needed. You just have to make sure, that your service is up and healthy(scripting) and if not to fence(forcefully remote initiated shutdown/disconnect) the failed server/vm/container.

Common fencing methods are for example:
  • shutdown by baseboard power control(IPMI,AMT,iDrac,iLo,Remote Controllable Rack Power Distributor,..)
  • shutdown switch port of a managed switch
  • executing an arbitrary command(ssh vmhost kill vm, ...)

Further there is a need for clusters to have an unequal number of nodes within the cluster, so if there are different views of the system state on the different nodes, the cluster can reliably decide which node is failing. So you need at least 3 instances.

My practical experience of the pacemaker stack is a bit limited. I have read some about it and created several test setups, but I did not operate those directly managed systems. I have some few prebuilt solutions like proxmox(preferred, Open Source Variant available) or XCP NG(Open Source, Clone of Citrix XenServer aka Citrix Hypervisor), that offer HA-functionality for virtual machines.

Last edited by hicksd8; 04-25-2019 at 01:27 PM.. Reason: Remove typo
This User Gave Thanks to stomp For This Post:
# 5  
Old 04-26-2019
Thanks for your reply.
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.


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



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.
# 6  
Old 04-26-2019
Hi,

what you write should be pretty basic functionality of corosync/pacemaker. Since I'm not very deep into this topic, I would have to read the documentation to give further hints on exactly how to do it.

So that's all I have to give right now. You may want to check google and the documentation for yourself, and I would be happy if you share your experiences and maybe configs afterwards.

Regards,
stomp
# 7  
Old 04-26-2019
It might be clearer if you took this bit:
Quote:
*************(floating IP)************
| ***route all traffic on every port ***|
| ******************************************|
ServerA*************************** ServerB
(APP) **************************(Stopped App)
.... and wrapped it in CODE tags, the edited it to look how you would like.

Wrapping in CODE tags will respect the spaces which is important for indenting or fixed-width data, or in your case a text-based diagram. I've tried, but I'm not quite sure what you want to show.


A short tutorial is included below. The look/feel of the forum has changed, as have the buttons, but method 1 still works just fine.



Kind regards,
Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Sun cluster 4.0 - zone cluster failover doubt

Hello experts - I am planning to install a Sun cluster 4.0 zone cluster fail-over. few basic doubts. (1) Where should i install the cluster s/w binaries ?. ( global zone or the container zone where i am planning to install the zone fail-over) (2) Or should i perform the installation on... (0 Replies)
Discussion started by: NVA
0 Replies

2. Solaris

Sun cluster and Veritas cluster question.

Yesterday my customer told me to expect a vcs upgrade to happen in the future. He also plans to stop using HDS and move to EMC. Am thinking how to migrate to sun cluster setup instead. My plan as follows leave the existing vcs intact as a fallback plan. Then install and build suncluster on... (5 Replies)
Discussion started by: sparcguy
5 Replies

3. Red Hat

Custom HA agent - Red Hat Linux Cluster

Hi experts, I have some custom application which I need to make Highly Available using red hat cluster service. How do I do it? i know in /usr/share/cluster i shall find HA agents for well known services like Apache or Sybase but I want to write HA agent for my own. I tried looking up on... (4 Replies)
Discussion started by: pshaikh
4 Replies

4. AIX

How to add node to the cluster with stoping the application?

In the production hacmp 5.3 is running with three nodes but i want to add new node to cluster with out stopping the application ie with same resource group if any bady know pls help me. (1 Reply)
Discussion started by: manjunath.m
1 Replies

5. High Performance Computing

SUN Cluster Vs Veritas Cluster

Dear All, Can anyone explain about Pros and Cons of SUN and Veritas Cluster ? Any comparison chart is highly appreciated. Regards, RAA (4 Replies)
Discussion started by: RAA
4 Replies

6. HP-UX

Install application on UNIX cluster

Hi everyone, I have a new engagement where in I would need to install an inhouse server application in a HP_UNIX cluster. Please let me know how this should be done. Satish (4 Replies)
Discussion started by: satish_000
4 Replies

7. High Performance Computing

Building a Solaris Cluster Express cluster in a VirtualBox on OpenSolaris

Provides a description of how to set up a Solaris Cluster Express cluster in a VirtualBox on OpenSolaris. More... (0 Replies)
Discussion started by: Linux Bot
0 Replies

8. UNIX for Dummies Questions & Answers

How to custom application name in `ps -ef`?

A program named /usr/bin/aa.sh, two parameters: 11, 22. after start it, the row in `ps -ef` is almost like the following: root 12198 10278 0.0 Nov 25 pts/3 0:00.23 /usr/bin/aa.sh 11 22 but I want to change "/usr/bin/aa.sh 11 22" to one rule string, such as: "AA_11_22", how to... (1 Reply)
Discussion started by: linkjack
1 Replies
Login or Register to Ask a Question