Re: performance problem of Failover Datasource? - Mailing list pgsql-jdbc

From Chen Huajun
Subject Re: performance problem of Failover Datasource?
Date
Msg-id 50CC2279.3090301@cn.fujitsu.com
Whole thread Raw
In response to Re: performance problem of Failover Datasource?  (Chen Huajun <chenhj@cn.fujitsu.com>)
Responses Re: performance problem of Failover Datasource?  (Scott Harrington <scotth01@sns-usa.com>)
List pgsql-jdbc
Hi

In this patch,I use Collections.synchronizedSet to synchronize within multi-threads.
But i worry about locking operation is a litter frequent by Collections.synchronizedSet
  and may affect performance.
I think using keword "synchronized" explicitly instead of Collections.synchronizedSet
  may reduce times of locking.Is there any better suggestion?


In addition, I have a idea.
By adjusting the order of hosts we also can implement a simple load balance
while all of the hosts are master or read only slave.
For example:
Basically pick up the server randomly.If one server had dead remove it from the candidates,
and retry the next server.
And after a while(can be configured) re-add the dead host to the candidates because the dead
server may had been repaired.


What about that?



(2012/12/14 21:29), Chen Huajun wrote:
> Hi
>
> I had make the patch,Please check it.
>
> and I had run the testcases,the result is same as before modified.
>
>
>
>
>

--
Best Regards,
Chen Huajun




pgsql-jdbc by date:

Previous
From: dmp
Date:
Subject: Re: Fwd: [ADMIN] Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)
Next
From: Scott Harrington
Date:
Subject: Re: performance problem of Failover Datasource?