You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kent Larsson <ke...@gmail.com> on 2008/11/19 10:37:38 UTC

Help with load-balancing and fail-over in a Hibernate, Spring, Wicket 3-tier architecture

Hi,

I have this 3-tier architecture in mind:

1. Persistence: Hibernate with MySQL
2. Business: Spring 2.5
3. Presentation: Wicket

I want my application to have high availability and scalability, so I
want to cluster it with load-balancing, fail-over and synchronization.
I wonder if you know of any nice tutorial which will educate me on the
subject? And if not, if you can give me some pointers of what I need
to do.

I have some questions below, if you know of something I haven't
thought to ask about feel free to educate me further. I've found it
hard to find concrete information regarding this topic.

1. Do I have to run this inside a Java EE server or is it possible using Tomcat?
2. Should I run this inside a Java EE server? I have used JBoss 4.x,
maybe I should use it?

I have seen suggestions for deployment architectures similar to this one:

[Active load balancer] - [Backup load balancer]
              |
[WebServer1] , [WebServer2] , ... [WebServerN]
              |
[MySqlServer1] , [MySqlServer2] , ... [MySqlServerN]

3. What should I use for load balancer? (I know there are multiple
load balancing strategies.)
4. I've heard that WebServer1, ... , WebServerN should be
synchronized, use fail-over and be load-balanced. Exactly what do I
have to synchronize? How is that achieved?
5. I've also heard that MySqlServer1, ... , MySqlServerN should be
synchronized, use fail-over and be load-balanced. Exactly what do I
have to synchronize? How is that achieved?
6. In the past I've only a 3-tier architecture based on JPA, EJB
(Stateless session beans) and JSP+Servlet for Persistence, Business
and the Presentation layers. Pure Hibernate (I've used JPA with
Hibernate as persistence provider) is new to me, Spring 2.5 is new and
Wicket is new. Also creating a clustered solution like this is new to
me. :-) I'm a bit afraid that there are too many new components for me
to handle. Wicket seems easy enough, I'm reading Wicket in Action. Do
you think I should change any of the other components into components
I've used before, as the new components requires a high learning
investment? (I should also make a note of that I am not entirely
satisfied with Java EE in its current version.)

If you've read this far, thank you! I'm a bit lost at the moment as
solutions with high availability and scalability are new to me, I
would really appreciate any help I can get.

Best regards, Kent

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Help with load-balancing and fail-over in a Hibernate, Spring, Wicket 3-tier architecture

Posted by Martin Tilma <m....@func.nl>.
Hi,

>> For wicket you just need tomcat with sticky sessions. Then you only have to take care of the hibernate caching on each tomcat instance
> 
> Thank you! I'll read up on tomcat with sticky sessions. What do you
> mean with take care of hibernate caching on each tomcat instance? To
> have them synchronized as well?

Have a look at: http://www.terracotta.org there are integrations with 
Hibernate EHCache and wicket.

Bye,

Martin

> 
> 
>> On 11/19/08, Kent Larsson <ke...@gmail.com> wrote:
>>> Hi,
>>>
>>> I have this 3-tier architecture in mind:
>>>
>>> 1. Persistence: Hibernate with MySQL
>>> 2. Business: Spring 2.5t.
>>> 3. Presentation: Wicket
>>>
>>> I want my application to have high availability and scalability, so I
>>> want to cluster it with load-balancing, fail-over and synchronization.
>>> I wonder if you know of any nice tutorial which will educate me on the
>>> subject? And if not, if you can give me some pointers of what I need
>>> to do.
>>>
>>> I have some questions below, if you know of something I haven't
>>> thought to ask about feel free to educate me further. I've found it
>>> hard to find concrete information regarding this topic.
>>>
>>> 1. Do I have to run this inside a Java EE server or is it possible using
>>> Tomcat?
>>> 2. Should I run this inside a Java EE server? I have used JBoss 4.x,
>>> maybe I should use it?
>>>
>>> I have seen suggestions for deployment architectures similar to this one:
>>>
>>> [Active load balancer] - [Backup load balancer]
>>>               |
>>> [WebServer1] , [WebServer2] , ... [WebServerN]
>>>               |
>>> [MySqlServer1] , [MySqlServer2] , ... [MySqlServerN]
>>>
>>> 3. What should I use for load balancer? (I know there are multiple
>>> load balancing strategies.)
>>> 4. I've heard that WebServer1, ... , WebServerN should be
>>> synchronized, use fail-over and be load-balanced. Exactly what do I
>>> have to synchronize? How is that achieved?
>>> 5. I've also heard that MySqlServer1, ... , MySqlServerN should be
>>> synchronized, use fail-over and be load-balanced. Exactly what do I
>>> have to synchronize? How is that achieved?
>>> 6. In the past I've only a 3-tier architecture based on JPA, EJB
>>> (Stateless session beans) and JSP+Servlet for Persistence, Business
>>> and the Presentation layers. Pure Hibernate (I've used JPA with
>>> Hibernate as persistence provider) is new to me, Spring 2.5 is new and
>>> Wicket is new. Also creating a clustered solution like this is new to
>>> me. :-) I'm a bit afraid that there are too many new components for me
>>> to handle. Wicket seems easy enough, I'm reading Wicket in Action. Do
>>> you think I should change any of the other components into components
>>> I've used before, as the new components requires a high learning
>>> investment? (I should also make a note of that I am not entirely
>>> satisfied with Java EE in its current version.)
>>>
>>> If you've read this far, thank you! I'm a bit lost at the moment as
>>> solutions with high availability and scalability are new to me, I
>>> would really appreciate any help I can get.
>>>
>>> Best regards, Kent
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


-- 
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Help with load-balancing and fail-over in a Hibernate, Spring, Wicket 3-tier architecture

Posted by Kent Larsson <ke...@gmail.com>.
> Can mysql really load balance like that? How does it work with transactions and so on?

I think so, but I don't know much about it as I haven't read the white
paper yet. Here is a link:
http://www.mysql.com/products/database/cluster/

> Normally you scale the webservers and have 1 big database server thats serves all of them.

But I would really like some fail-over on the database side as well.
If I can help it I don't want any single point of failure.

> For wicket you just need tomcat with sticky sessions. Then you only have to take care of the hibernate caching on each tomcat instance

Thank you! I'll read up on tomcat with sticky sessions. What do you
mean with take care of hibernate caching on each tomcat instance? To
have them synchronized as well?


>
> On 11/19/08, Kent Larsson <ke...@gmail.com> wrote:
>> Hi,
>>
>> I have this 3-tier architecture in mind:
>>
>> 1. Persistence: Hibernate with MySQL
>> 2. Business: Spring 2.5t.
>> 3. Presentation: Wicket
>>
>> I want my application to have high availability and scalability, so I
>> want to cluster it with load-balancing, fail-over and synchronization.
>> I wonder if you know of any nice tutorial which will educate me on the
>> subject? And if not, if you can give me some pointers of what I need
>> to do.
>>
>> I have some questions below, if you know of something I haven't
>> thought to ask about feel free to educate me further. I've found it
>> hard to find concrete information regarding this topic.
>>
>> 1. Do I have to run this inside a Java EE server or is it possible using
>> Tomcat?
>> 2. Should I run this inside a Java EE server? I have used JBoss 4.x,
>> maybe I should use it?
>>
>> I have seen suggestions for deployment architectures similar to this one:
>>
>> [Active load balancer] - [Backup load balancer]
>>               |
>> [WebServer1] , [WebServer2] , ... [WebServerN]
>>               |
>> [MySqlServer1] , [MySqlServer2] , ... [MySqlServerN]
>>
>> 3. What should I use for load balancer? (I know there are multiple
>> load balancing strategies.)
>> 4. I've heard that WebServer1, ... , WebServerN should be
>> synchronized, use fail-over and be load-balanced. Exactly what do I
>> have to synchronize? How is that achieved?
>> 5. I've also heard that MySqlServer1, ... , MySqlServerN should be
>> synchronized, use fail-over and be load-balanced. Exactly what do I
>> have to synchronize? How is that achieved?
>> 6. In the past I've only a 3-tier architecture based on JPA, EJB
>> (Stateless session beans) and JSP+Servlet for Persistence, Business
>> and the Presentation layers. Pure Hibernate (I've used JPA with
>> Hibernate as persistence provider) is new to me, Spring 2.5 is new and
>> Wicket is new. Also creating a clustered solution like this is new to
>> me. :-) I'm a bit afraid that there are too many new components for me
>> to handle. Wicket seems easy enough, I'm reading Wicket in Action. Do
>> you think I should change any of the other components into components
>> I've used before, as the new components requires a high learning
>> investment? (I should also make a note of that I am not entirely
>> satisfied with Java EE in its current version.)
>>
>> If you've read this far, thank you! I'm a bit lost at the moment as
>> solutions with high availability and scalability are new to me, I
>> would really appreciate any help I can get.
>>
>> Best regards, Kent
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Help with load-balancing and fail-over in a Hibernate, Spring, Wicket 3-tier architecture

Posted by Johan Compagner <jc...@gmail.com>.
Can mysql really load balance like that? How does it work with
transactions and so on?

Normally you scale the webservers and have 1 big database server thats
serves all of them.

For wicket you just need tomcat with sticky sessions. Then you only
have to take care of the hibernate caching on each tomcat instance

On 11/19/08, Kent Larsson <ke...@gmail.com> wrote:
> Hi,
>
> I have this 3-tier architecture in mind:
>
> 1. Persistence: Hibernate with MySQL
> 2. Business: Spring 2.5
> 3. Presentation: Wicket
>
> I want my application to have high availability and scalability, so I
> want to cluster it with load-balancing, fail-over and synchronization.
> I wonder if you know of any nice tutorial which will educate me on the
> subject? And if not, if you can give me some pointers of what I need
> to do.
>
> I have some questions below, if you know of something I haven't
> thought to ask about feel free to educate me further. I've found it
> hard to find concrete information regarding this topic.
>
> 1. Do I have to run this inside a Java EE server or is it possible using
> Tomcat?
> 2. Should I run this inside a Java EE server? I have used JBoss 4.x,
> maybe I should use it?
>
> I have seen suggestions for deployment architectures similar to this one:
>
> [Active load balancer] - [Backup load balancer]
>               |
> [WebServer1] , [WebServer2] , ... [WebServerN]
>               |
> [MySqlServer1] , [MySqlServer2] , ... [MySqlServerN]
>
> 3. What should I use for load balancer? (I know there are multiple
> load balancing strategies.)
> 4. I've heard that WebServer1, ... , WebServerN should be
> synchronized, use fail-over and be load-balanced. Exactly what do I
> have to synchronize? How is that achieved?
> 5. I've also heard that MySqlServer1, ... , MySqlServerN should be
> synchronized, use fail-over and be load-balanced. Exactly what do I
> have to synchronize? How is that achieved?
> 6. In the past I've only a 3-tier architecture based on JPA, EJB
> (Stateless session beans) and JSP+Servlet for Persistence, Business
> and the Presentation layers. Pure Hibernate (I've used JPA with
> Hibernate as persistence provider) is new to me, Spring 2.5 is new and
> Wicket is new. Also creating a clustered solution like this is new to
> me. :-) I'm a bit afraid that there are too many new components for me
> to handle. Wicket seems easy enough, I'm reading Wicket in Action. Do
> you think I should change any of the other components into components
> I've used before, as the new components requires a high learning
> investment? (I should also make a note of that I am not entirely
> satisfied with Java EE in its current version.)
>
> If you've read this far, thank you! I'm a bit lost at the moment as
> solutions with high availability and scalability are new to me, I
> would really appreciate any help I can get.
>
> Best regards, Kent
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org