[ClusterLabs] Multiple apache services running
Vijay Partha
vijaysarathy94 at gmail.com
Mon Aug 3 17:08:29 UTC 2015
Hi
For this question: Is it possible to control even for multiple instances of
apache? like i have node 1 running 2 instances of apache and another node
running 1 instance in apache. If my apache server goes down will all these
instances be restarted?
Could you give me an example on how this can work. I mean commands that
will make the above case pass.
Thanking You.
On Wed, Jul 29, 2015 at 10:34 AM, Vijay Partha <vijaysarathy94 at gmail.com>
wrote:
> fine will have a look at it. thank you so much.
> On 29 Jul 2015 22:56, "Ken Gaillot" <kgaillot at redhat.com> wrote:
>
>> On 07/29/2015 09:24 AM, Vijay Partha wrote:
>> > could you give an idea on how active active could be achieved?
>>
>> Clusters From Scratch gives a simple walk-through of active/active. See
>>
>> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Clusters_from_Scratch/index.html
>>
>> The basic components are:
>>
>> 1. Fencing
>>
>> 2. Shared storage (DRBD in the walk-through, or could be a SAN or NAS,
>> etc.)
>>
>> 3. Clustered file system (GFS2 in the walk-through) and optionally CLVM
>> (if you want to use logical volumes with shared storage); these often
>> require DLM (distributed lock manager) as well
>>
>> 4. Your service (apache in this case)
>>
>> 5. Some type of load balancer (multicast Ethernet in the walk-through,
>> although something like haproxy is more often used in production)
>>
>> > On 29 Jul 2015 19:52, "Ken Gaillot" <kgaillot at redhat.com> wrote:
>> >
>> >> On 07/29/2015 09:03 AM, Vijay Partha wrote:
>> >>> Thanks a lot Ken. for the second case whatever you said , is it
>> possible
>> >> to
>> >>> control even for multiple instances of apache? like i have node 1
>> >> running 2
>> >>> instances of apache and another node running 1 instance in apache. If
>> my
>> >>> apache server goes down will all these instances be restarted?
>> >>
>> >> It depends on how you have those instances linked together.
>> >>
>> >> If they're independent -- one node runs www.A.com and another node
>> runs
>> >> api.A.com -- then there's no coordination necessary. Each can be
>> >> monitored, stopped and started independently of the other.
>> >>
>> >> If your goal is to do active-passive failover (if the node serving
>> >> www.A.com goes down, apache is started on another node), then
>> pacemaker
>> >> will handle that automatically.
>> >>
>> >> If your goal is to do active-active load-balancing (every node can
>> serve
>> >> requests to www.A.com simultaneously), that's a more complicated
>> >> configuration, but pacemaker can do it.
>> >>
>> >> In any of the cases, it's generally not necessary to restart apache on
>> >> all nodes. If it's not working on one node, it can be restarted there.
>> >> You can manually disable and reenable the service if you want to force
>> a
>> >> restart everywhere.
>> >>
>> >>> On Wed, Jul 29, 2015 at 7:26 PM, Ken Gaillot <kgaillot at redhat.com>
>> >> wrote:
>> >>>
>> >>>> On 07/29/2015 08:05 AM, Vijay Partha wrote:
>> >>>>> Hi.
>> >>>>>
>> >>>>> Victor, Whatever you said i had tried and got it working. Thank you.
>> >>>>>
>> >>>>> Could you guys answer the following questions please?
>> >>>>>
>> >>>>> 1.) I have 2 apache services running on the same node. If the
>> services
>> >> go
>> >>>>> down can pacemaker restart it?
>> >>>>
>> >>>> Yes, that's what pacemaker is for :)
>> >>>>
>> >>>> If by two services you mean two server instances of apache, then you
>> >>>> would configure two apache resources in pacemaker. If you mean two
>> web
>> >>>> apps running in one apache server, you'd configure one apache
>> resource
>> >>>> in pacemaker.
>> >>>>
>> >>>> You would also need a monitor operation, which tells pacemaker to
>> >>>> periodically check the health of the service.
>> >>>>
>> >>>> The migration-threshold and on-fail options determine what the
>> cluster
>> >>>> does on failure. See the documentation for possible values, but the
>> >>>> default behavior is to try to restart the service on the same node.
>> >>>>
>> >>>> The documentation for all the options is at
>> >>>>
>> >>>>
>> >>
>> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html
>> >>>>
>> >>>>> 2.) I have 2 apache services running on different nodes. Can i
>> control
>> >>>> both
>> >>>>> the resources from a single node by making use of pacemaker?
>> >>>>
>> >>>> The various cluster tools work from any node, to affect any or all
>> >>>> nodes. Most commonly you'd use one of the high-level cluster shells
>> >>>> (crmsh or pcs). They have commands to enable/disable a resource,
>> move a
>> >>>> resource to a different node, put a node in standby mode, etc.
>>
>
--
With Regards
P.Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20150803/73e44b14/attachment-0003.html>
More information about the Users
mailing list