Question


Capgemini
FR
Last activity: 10 Jan 2017 12:09 EST
Best way on cluster configuration
Hi,
This question is for system architect who had experience on cluster environment: what is the best solution between this two choices (in attachment) ? Thanks
Regards
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Capgemini
FR
Thanks but I've found it! PostgreSQL driver can do it:
Connection Fail-over
To support simple connection fail-over it is possible to define multiple endpoints (host and port pairs) in the connection url separated by commas. The driver will try to once connect to each of them in order until the connection succeeds. If none succeed, a normal connection exception is thrown.
The syntax for the connection url is:
jdbc:postgresql://host1:port1,host2:port2/database
The simple connection fail-over is useful when running against a high availability postgres installation that has identical data on each node. For example streaming replication postgres or postgres-xc cluster.
Thanks but I've found it! PostgreSQL driver can do it:
Connection Fail-over
To support simple connection fail-over it is possible to define multiple endpoints (host and port pairs) in the connection url separated by commas. The driver will try to once connect to each of them in order until the connection succeeds. If none succeed, a normal connection exception is thrown.
The syntax for the connection url is:
jdbc:postgresql://host1:port1,host2:port2/database
The simple connection fail-over is useful when running against a high availability postgres installation that has identical data on each node. For example streaming replication postgres or postgres-xc cluster.
For example an application can create two connection pools. One data source is for writes, another for reads. The write pool limits connections only to master node:
jdbc:postgresql://node1,node2,node3/accounting?targetServerType=master . And read pool balances connections between slaves nodes, but allows connections also to master if no slaves are available:
jdbc:postgresql://node1,node2,node3/accounting?targetServerType=preferSlave&loadBalanceHosts=true


Pegasystems Inc.
IN
Pega Sizing information is done based on many factors. Its hard to say what is best without understanding the Application, DB, Userload, Storgae, etc..
Having 4GB RAM for one JVM is not suggested and you should have more memory. This also changes based on user load.
Few Examples:-
Migrating from previous Pegasystems product?
Named user count
Internal Portal Concurrent Users
Internal Portal Occasional Users
Internal Portal Concurrent Occasional User (%)
Concurrent Web Users
Concurrent Contact Centre Users
Default work hours per day
Default work days per year
Application server operating system
Operating system virtualization?
Will hardware based load balancing be used?
Will software based load balancing be used?
What type of disaster recovery / replication?
Storage for PRPC Estimate
Database Server Ratio To Application Server
Database Server Estimated CPU Units
Database minimum memory
Database Server Maximum CPU Cores
Storage for PRPC, rules, initial loads and static data
Annual Storage Growth Rate
Default work object retention years
Total Number of Database Table Rows
Estimated Total Storage
Total connections in the DBMS
Maximum JDBC connections per JVM
Application Server Workload Estimate


PEG
PL
It depends on your application.
Few scenarios which will help you to resolve this :
1) You are upgrading from 4+4 to 4+4+4+4 or 8+8, so why you are upgrading. Because of frequent OOM or any other reason.
2) Do your system has many agents/listeners. If it is the case, you coul ddedicate one node for that. In such case 4 gb one will be good.
3) If your have lots of reports running and big DB interations, then 8+8 will be good.
so in nutshell, knowing the application will only answer this.


Capgemini
FR
Hi,
Thanks a lot for your answers. I'm agree: without any application's specifications, it's difficult to define an architecture. To answer to your questions:
1) No reason. We've just started te developpment, only 20% have been done.
2) right now, I know that 3 agents have been created for the application.
The problem is that I don't really have informations on the application (we've asked but still waiting for). What I know, it's that they will have other applications (totally different) using the same Pega Platform.
What I want to know is how do I size the JVM memory at the beginning ? And is it better to have one big instance with 8 GB or two instances with 4 GB each?
But the better answer is to do stress test with differents configurations to see which one is the best way when the application will be installing...


Pegasystems Inc.
IN
as we will not be able to consider any parameters at the beginning, have initial size of 4 or 8 GB based on hardware availability. Analyze the GC logs over the period to increase the size.
Page 12 from below URL:
as we will not be able to consider any parameters at the beginning, have initial size of 4 or 8 GB based on hardware availability. Analyze the GC logs over the period to increase the size.
Page 12 from below URL:
Application server memory requirements The Pega 7 Platform runs in memory (heap) on Java Virtual Machines (JVMs). In general, all activity is distributed over multiple JVMs (nodes) on the application server. l Standard suggested system heap size is 4 - 8 GB based on monitoring of memory usage and garbage collection frequency. l Larger heaps are advisable if your applications allow a high number of concurrent open tasks per session or cache a large collection of transaction or reference data. l Do not deploy the Pega 7 Platform in an environment where the heap size exceeds the vendorspecific effectiveness limit. In current 64-bit JVMs, compression is enabled by default. The host application server memory size must be at least 4 GB larger than the Pega 7 Platform heap size to allow space for the operating system, monitoring tools, operating system network file buffering, and JVM memory size (-XMX option). The minimum host application server memory size is 8 GB: 4 GB heap + 4 GB for native memory, operating system, and buffering If the server does not have enough memory allocated to run the Pega 7 Platform, the system can hang without an error message. The correct memory settings depend on your server hardware, the number of other applications, and the number of users on the server, and might be larger than these recommendations.


Capgemini
FR
Hi ,
Thanks for your answer. I will keep my settings and see if it's enough by monitoring GC.
Regards


Capgemini
FR
Hi,
Just another question on high availability: can we configured two datasources on Pega instances, the first one for access to primary database instance, and the second one, when the first one crashed, for secondary database instance ?
Thanks


Pegasystems Inc.
IN
For this, you can utilize Oracle's high availability features in case you are using Oracle.


Capgemini
FR
Hi,
Thanks ARVINDMALAV but we are using PostgreSQL (EnterpriseDB).
Sorry, I didn't mention it.
Thanks


Pegasystems Inc.
IN
For PostgreSQL, you can refer its doc here:
https://www.postgresql.org/docs/9.5/static/high-availability.html


Capgemini
FR
Thanks but we will have a failover cluster on the database, so when the first database server crashs, the second one will be active with a different IP address.
Can we configure two datasoures on tomcat and configure Pega to use the first one but if it doesn't responds, use the second one ? Thanks


Pegasystems Inc.
IN
Hi,
You can try this approach:
http://forum.spring.io/forum/spring-projects/data/30963-jdbc-connection-failover
Here, Datasources are mentioned as comma separated.
Hope this helps you.
Accepted Solution


Capgemini
FR
Thanks but I've found it! PostgreSQL driver can do it:
Connection Fail-over
To support simple connection fail-over it is possible to define multiple endpoints (host and port pairs) in the connection url separated by commas. The driver will try to once connect to each of them in order until the connection succeeds. If none succeed, a normal connection exception is thrown.
The syntax for the connection url is:
jdbc:postgresql://host1:port1,host2:port2/database
The simple connection fail-over is useful when running against a high availability postgres installation that has identical data on each node. For example streaming replication postgres or postgres-xc cluster.
Thanks but I've found it! PostgreSQL driver can do it:
Connection Fail-over
To support simple connection fail-over it is possible to define multiple endpoints (host and port pairs) in the connection url separated by commas. The driver will try to once connect to each of them in order until the connection succeeds. If none succeed, a normal connection exception is thrown.
The syntax for the connection url is:
jdbc:postgresql://host1:port1,host2:port2/database
The simple connection fail-over is useful when running against a high availability postgres installation that has identical data on each node. For example streaming replication postgres or postgres-xc cluster.
For example an application can create two connection pools. One data source is for writes, another for reads. The write pool limits connections only to master node:
jdbc:postgresql://node1,node2,node3/accounting?targetServerType=master . And read pool balances connections between slaves nodes, but allows connections also to master if no slaves are available:
jdbc:postgresql://node1,node2,node3/accounting?targetServerType=preferSlave&loadBalanceHosts=true


Pegasystems Inc.
IN
You got it right.
Example, I gave had Oracle specific parameters, and your example is in line with what was given for Oracle. ( just making is Portgresql specific).


Capgemini
FR
Yes, I will try it tomorrow.
Thanks a lot for your help ;)