IMO in this scenario MySQL cluster should be fronted with a load balancer
and the load balancer IP/cluster hostname should be used by the PHP
instances to access MySQL database(s).

Directly accessing MySQL instances is not recommended.

On Tue, Nov 4, 2014 at 5:26 PM, Udara Liyanage <[email protected]> wrote:

> Hi Reka, Isuru,
>
> In a simpler scneario where PHP depends on MySQL, PHP instance get the
> MySQL details(host, username, password) from the metadata service. If MySQL
> instance is restarted, IP of the MySQL instance is changed, but it is not
> reflected to PHP instance. PHP app will fails when it tries to connect to
> the MySQL database.
>
> A possible solution
>
>      1) Agent listen to the ClusterInactivatedEvent
>      2) When the event received, check the inactivate cluster is a
> dependency of the particular instance's cluster
>      3) If so, re fetch the details from the metadata service.
>
> Better suggestions are appreciated.
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to