Scalable Performance for Web Applications

4 downloads 208 Views 260KB Size Report
management from VMware vFabric tc Server or Tomcat application servers , as well as .... custom Java applications – in
SOLUTIONS OVERVIEW

Scalable Performance for Web Applications

With the VMware vFabric GemFire HTTP Session Management & Hibernate Cache Modules

At a G l a n c e

VMware vFabric™ GemFire® is an elastic, in-memory distributed data management platform. It is used by many customer segments including financial services, public agencies, online gaming and others. Customers use GemFire in various ways to help enable modern applications that include high performance and scalability. While GemFire provides a very sophisticated, global data management platform, two common use cases include the management of user session data and providing second level (L2) caching for applications using Hibernate. GemFire offers two modules that make it simple to deploy these two use cases.

VMware vFabric GemFire HTTP Session Management Module The GemFire HTTP Session Management Module enables quick and easy session management support for simple deployment scenarios. GemFire also supports decoupling of session management from VMware vFabric tc Server or Tomcat application servers , as well as moving session data into a seperate GemFire process. By doing so, this module enables the application server to remain stateless and scale-out independently of the HTTP session data. Separating concerns in this way has many benefits: • Share session data between applications • Handle more user data under heavy load • Manage very large sessions efficiently • Leverage GemFire’s sophisticated in-memory data management capabilities including failover, recovery, and “shared-nothing” design.

Key Benefits Scalability Applications with a small number of frequently-accessed sessions can replicate session information on all nodes in the cluster. However, when the number of concurrent sessions being managed is large, data can be partitioned across any number of servers (either embedded within your application server process or managed by GemFire cache servers), which allows for linear scaling. Additionally, capacity can be dynamically added or removed in a running system and GemFire re-executes a non-blocking, rebalancing logic to migrate data from existing nodes to the newly added nodes. When the session state memory requirements exceed available memory, each partition node can overflow to disk. Simple Setup While GemFire HTTP Session Management works easily with Tomcat servers, configuring it to run with tc Server is incredibly easy. Simply unzip the GemFire HTTP Session Management Module into the tc Server templates directory. Next, start a tc Server instance with the appropriate tc Server template depending on your preferred topology (peer-to-peer or client/server) and you now have the extensive benefits of GemFire available to tc Server. Tomcat customers perform a simple manual configuration and gain the same GemFire benefits. Server-Managed Session State Session state can be managed independent of the application server cluster. This allows applications or servers to come and go without impacting session lifetimes. Shared Nothing Cluster-Wide Persistence Session state can be persisted (and recovered) - invaluable for scenarios where sessions manage critical application state or have long lifetimes. GemFire uses a shared nothing persistence model where each node can continuously append to rolling log files without ever needing to seek on disk, providing very high disk throughput. When data is partitioned, the total disk throughput can come close to the aggregate disk transfer rates across each of the nodes storing data on disk.

SOLUTIONS OVERVIEW / 1

Scalable Performance for Web Applications

Session Deltas When session attributes are updated, only the updated state is sent over the wire (to cache servers and to replicas). This provides fast updates even for large sessions. Session state is always managed in a serialized state on the servers, avoiding the need for the cache servers to be aware of the application classes. Tiered Caching Applications can configure a local or near cache for in-process caching of the most frequently used session state. This local cache delegates to a farm of cache servers where the entire session state is partitioned across any number of peer cache servers. The local cache can be configured to consume a certain percentage of the total heap available before least-recently used (LRU) eviction. This is a simpler and more effective way to manage LRU caches as opposed to alternate strategies based on count or memory size, which increase the risk of getting an “OutOfMemoryException”.

Application Server Sizing Another aspect of tiered-caching functionality is that session replication can be configured so that session objects are stored external to the application server process. This allows for the JVM heap settings on the application server to be much smaller.

Replication to Remote Clusters The session state can be asynchronously replicated to/from multiple clusters across a WAN. This allows for disaster recovery (DR) architectures, among other benefits.

Figure 1. Example of Client/Server configuration

SOLUTIONS OVERVIEW / 2

Scalable Performance for Web Applications

VMware vFabric GemFire Hibernate Cache Module Hibernate is a widely used technology to map Java objects to a traditional database model. The vFabric GemFire Hibernate Cache Module provides fast, scalable, distributed L2 caching for Hibernate, thus reducing, or completely eliminating, the need to retrieve data from the database. The end result is significant application performance gains. Why use GemFire Hibernate Cache Module? • GemFire’s L2 cache solution improves Hibernate performance • Reduces traffic to your database server • Simple to configure: requires just a few changes to hibernate.cfg.xml • Flexible caching options, supporting several local and distributed configurations • Access to many GemFire features • Performance and scalability benefits of GemFire Depending on your usage model, you can replicate data across multiple peers, partition data across multiple servers, or manage your data in many other customizable ways.

Figure 2. GemFire caching Hibernate data in Client/Server configuration

SOLUTIONS OVERVIEW / 3

Scalable Performance for Web Applications

Systems Requirements • GemFire runs on a Java Runtime Environment (JRE) in 32-bit and 64-bit mode on Windows, Linux and Solaris. • GemFire supports peer-to-peer, client/server, and multi-site (WAN) architectures. Only Java supported in peer-to-peer configurations. • HTTP Session Management Module: - tc Server 2.1 or higher (supports new template mechanism) - Prior versions of tc Server and Tomcat server (simple manual configuration)

About VMware VMware, the global leader in virtualization and cloud infrastructure, delivers customerproven solutions that reduce IT complexity while significantly lowering costs and enabling more flexible, agile service delivery. About VMware vFabric VMware vFabric is the ideal application platform environment to run and manage custom Java applications – in the datacenter, virtualized environments, or the cloud.

Find Out More For information or to purchase VMware vFabric GemFire, call 1-877-4-VMWARE (outside of North America dial +1-650-427-5000), visit www.vmware.com/products, or search online for an authorized reseller. For detailed product specifications and systems requirements, please refer to the GemFire product documentation.

VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Item No: VMW-SO-SCALABLE-PERFORMANCE-GEMFIRE-USLET-103