Archive for July, 2007

220 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-9. (1 on 1 web hosting)

Friday, July 27th, 2007

220 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-9. A typical production environment The Web servers typically are configured using an application server software plug-in to balance the requests destined for an application server to the appropriate application server. The Web server plug-in should also be configured to use sticky sessions, because sending the same user to the same Web server but not to the same application server defeats the purpose of making sessions sticky. In some environments, Web servers are separated from application
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

Free web hosting with ftp - CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-8. The

Thursday, July 26th, 2007

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-8. The dynamic Web tier and the business tier each consist of four application server instances running on two physical machines, with replication being sent between machines. Hardware Infrastructure Hardware configurations are virtually limitless. Figure 8-9 attempts to summarize visually what I have seen most commonly in the field. As a request is received, it passes through a firewall to a load balancer that distributes the request across a collection of Web servers. The load balancer is best configured with sticky sessions, meaning that once a user makes a request and is forwarded to an application server, the user is forever directed to the same application server. This helps ensure both that a user s session information is always valid and never caught in between replicated servers and that the user is never redirected to a server that does not have the user s information.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Business web site - 218 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-7.

Thursday, July 26th, 2007

218 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-7. Defining at least two instances to support each tier makes scaling easier later. Finally, depending on your financial resources, try to keep your Java EE tiers physically separated: at least two machines horizontally and vertically clustered (or scaled) in the dynamic Web tier, and at least two in the business tier, as illustrated in Figure 8-8. In summary, the best layout is both vertical and horizontal scaling defined at each tier. If your failover requirements necessitate clusters, then define replication across physical machines. Note The configuration described in this section works for standard environments, but the game starts to change when using very large machines. In the case of very large machines, such as mainframes with hordes of CPUs, the machine is typically broken into logical partitions: you assign a certain amount of memory and a number of CPUs to a logical partition, and that acts as a virtual machine in and of itself. Once these logical partitions have been established, the aforementioned guidelines are applicable with the caveat that you cannot scale horizontally physically, only logically. But in reality, these machines rarely crash, and you can be reasonably confident that your application is safe.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-6. Implementing (Web server address)

Wednesday, July 25th, 2007

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-6. Implementing application resilience with two (or more) separate clusters, one residing at each data center Implementing two different clusters that persist to the same database can be a complicated configuration that typically requires a more restrictive data source configuration. If you maintain data objects in a cache in your cluster, and one of your items is changed in another cluster, then you have no way of knowing that your object is stale. The most common configuration I have seen is a hardening of user distribution to ensure that a specific user is always referred to a specific data center and a set of scheduled database synchronizations and cache invalidations. The result is that your data may be stale for up to a specified period of time (for example, your data may be guaranteed to be no more than 30 minutes stale), but when configuring high- availability applications you need to make a significant number of trade-offs to improve performance. Remember that you can always create cross data center clusters and ensure the integrity of your data, but this comes at a performance cost. Realizing the Logical Configuration Logically you want to separate tiers by functionality, and, as you realize this configuration, you want to create at least two instances of each logical tier. You want at least two Web servers, two application server instances, and two database instances. Furthermore, when separating the dynamic Web tier from business tiers, you want at least two instances of each, because when you configure the environment with two nodes at each tier, scaling to address additional requirements is relatively straightforward: add the new instance and add it to the cluster (or to the domain manager if not clustered). Establishing such an environment from the onset and configuring your application components to work in this environment early will save you pain if you are forced to scale later. Figure 8-7 illustrates this concept. To implement this configuration from a physical perspective, start by scaling tiers horizontally and then vertically in order to make your servers resilient to both application server and machine failures. For example, if you install four application server instances on the same machine, and that machine fails, then you lose all of the servers. But if you install two servers on each of two machines, then you still have four instances, but a hardware failure will not bring down your application.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Email web hosting - 216 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS The point

Tuesday, July 24th, 2007

216 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS The point is that if you require 99.999 percent availability and need to be able to withstand the loss of a complete data center, this is possible using Java EE. The key is to establish hori zontal clusters that span all of your data centers if a data center is lost, then your users are redirected to their secondary servers in an alternate data center. But before establishing this level of resilience, be sure that you need it, because it is incredibly expensive to transfer user session information to one or more secondary servers across the Internet whenever a user makes a request. The appropriate way to implement this approach is as follows: 1. Remove menial information from user sessions, such as page history, to ensure that a session is replicated only when a significant event has occurred. 2. Minimize session footprints so that when session information must be replicated across servers, the quantity of information is minimal. Then configure your cluster as you normally would, but ensure that a primary application server s secondary server resides in an alternate data center. Some application servers may offer different deployment options to better optimize this process, but this is the theory upon which this level of resilience is built, as illustrated in Figure 8-5. Figure 8-5. Implementing application resilience with failover across data centers Because replicating session information across the Internet is expensive, one strategy that I have seen employed by several large customer sites is the introduction of the following compromise: when an application server crashes within a data center, then the user s session information must fail over to an alternate server, but when an entire data center is lost, then the user s session information is lost. It is a fairly rare occurrence that an entire data center is lost, and requiring your users to log on again may not be unreasonable in this case. This implementation involves the creation of two (or more) separate clusters, one residing at each data center, as illustrated in Figure 8-6. By adding the caveat that failovers are not permissible across data centers, the overhead required to replicate session information is significantly reduced.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Vertical clustering provides (Web site template)

Tuesday, July 24th, 2007

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Vertical clustering provides additional failover benefits and minimizes the effects of restarting an application server, because additional application server instances are supporting your application. For example, if you have two application server instances one running on each of two machines and one fails, then you have reduced your application capacity by 50 percent. But if you have two application server instances running on both machines (four application server instances total), then when one fails or needs to be restarted, your application capacity is reduced by only 25 percent. Vertical clustering surprisingly adds another benefit that you might not initially consider: it provides better utilization of system resources. When you purchase a big, beefy machine to support your application server, the nature of the operating system limits the ability of a single process to adequately make use of all system resources. IBM published a study a few years back that substantiated this concept and determined that two or more processes can better utilize the CPU and physical memory than a single process. There is definitely a point of diminishing returns when you have too many processes running and competing for system resources, but as a general guideline consider defining one application server instance for every two CPUs. More processes may cause excessive context switching, while fewer may not be able to effectively use all of the CPUs. To discover the optimal number of application server instances for your environment, begin by defining one application server instance per two CPUs, load test, and measure both the system utilization and the throughput of your applications. Then add an additional application server instance on the machine, load test again, measure the system utilization and application throughput, and compare these results to the first test. Under expected load, was the CPU load better utilized without being saturated? Did the application throughput increase? If the answer to both questions is yes, then the added application server instance helpf performance of your application; otherwise, the additional instance hurt the performance and should be removed. Depending on the CPU load, you may wish to continue this exercise until you reach a point where performance degrades back off one application server instance and this is your ideal configuration. The target CPU utilization for your applications running under expected load should be between 75 and 85 percent. Disaster Recovery Before leaving the topic of software clusters, I want to examine a statement that Oracle CEO Larry Ellison made to the world in his 2001 Comdex keynote address a couple of years ago regarding the resilience of Oracle 9i to everything from hardware failure to natural disasters. Java EE was architected for resilience through clustering, and the proper deployment can ensure the level of resilience that you require. When Larry Ellison colorfully articulated that Oracle 9i could survive hardware failure, he was referring to horizontal scaling. When he claimed that Oracle 9i could survive natural disasters, he was referring to the creation of a horizontal cluster in which application servers fail over to other application servers residing in a different physical data center, potentially across the country or across the globe.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

214 CHAPTER 8 (Hp web site) HIGH-PERFORMANCE DEPLOYMENTS governing exactly

Monday, July 23rd, 2007

214 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS governing exactly the number of beans allowed in memory at any one time. When the cache is full and a new bean is added to the cache, then an existing bean must be selected to be removed from the cache (usually using a least recently used algorithm) and subsequently persisted to permanent storage to make space for the new bean. If the cache is sized too small, then this selection and persistence process will begin to negatively impact application performance; cache management overhead can negate the benefits of using a cache in the first place. But if the cache is sized appropriately to support the typical number of active users in your application, then you draw the following two benefits: Phantom users will quickly disappear from the in-memory cache to make room for active users, reducing the memory requirements for inactive users. Regardless of load, the maximum memory requirements to support user sessions will decrease. If phantom users return, their session information is not lost; rather, it only needs to be reloaded from permanent storage. This is a reasonable trade-off between session memory management and usability: users that stay inactive for too long retain their state, but require additional load time to obtain their state information when they return. If the load increases dramatically beyond the size of the cache, then application response time will degrade as a result of the cache management, but the application server will avoid an out-of-memory error condition. This is certainly not ideal, but degraded response time is better than no response. In summary, when architecting clusterable applications, you need to store as little information in user sessions as possible. If the session size still results in memory stress, then consider moving session information into a stateful session bean and sizing the cache appropriately to support as many active users as you can without negatively impacting the performance of your application server heap. Horizontal and Vertical Clusters Software clusters come in two forms: horizontal clusters and vertical clusters. Horizontal clustering involves deploying clustered application server instances on different physical machines. Vertical clustering involves deploying multiple application server instances on the same physical machine. Each approach has its own benefits, and the best implementation is a combination of the two. Horizontal clustering provides resilience to hardware failure in addition to the standard support for load balancing and failover. When defining your clusters, you always want to have clustered application servers residing on at least two different machines because hardware failure is not something that is within your control, even with the best preparations and plans. I know that hardware is becoming increasingly more resilient and is far more dependable than software, but imagine a tech mistakenly unplugging the wrong network cable how can you recover from that?
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS The default implementation

Monday, July 23rd, 2007

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS The default implementation persists each of the object s nonstatic and nontransient fields. Static fields are JVM specific (similar to global variables), and, by definition, transient fields are purposely not persisted. If your application requires any custom functionality in these methods, you can override them in your own serializable class. You can always gain access to the original functionality inside the overridden method by invoking the out.defaultWriteObject() and in.defaultReadObject() methods, respectively. In addition to implementing the java.io.Serializable interface, your nonstatic and nontransient fields must be either primitive types (for example, ints or floats) or serializable themselves (implementing the java.io.Serializableinterface and adhering to the same set of standards). If you attempt to deploy an application to a cluster that maintains nonserializable session information, then you will most likely receive a run-time error or unexpected behavior. An example of unexpected behavior is when you test failover and it may appear not to work at all for example, when your users fail over they are required to log in to the application again but the root of the problem is in the session serialization, not in the failover configuration. As a result, you may see an entry in your log files that alludes to attempting to serialize a nonserializable object. Architecting Clusterable Applications Once you ve satisfied the technical requirements, you can conceivably fail over any amount of session information from one server to another, but in practice you need to understand your sessions and decrease the quantity of information stored in your sessions. The quantity of data stored in your sessions directly impacts your cluster s performance because the session data must be transferred between primary and secondary application server instances. To further complicate matters, the granularity of session objects can have a direct impact on the quantity of data transferred between machines. Consider storing a configuration object in a user s session object that occupies approximately 1MB of memory. Modifying a single integer in that object marks it as dirty, and the entire 1MB object must be transferred across the network to the server s secondary server(s). On the other hand, while sending a single integer is more efficient than sending a 1MB object, managing 2,000 individual object attributes is not sustainable. So you need to establish a balance between manageability and performance. Because you need to meticulously scrutinize every byte of data stored in your sessions, I suggest following these guidelines when defining session attributes: Store in sessions temporal information, such as navigation information (where did I come from? What steps did I follow to get here? Where am I going?), and ensure that it is cleaned up appropriately when the active business process is complete. Store paging indices or iterators, but never in the objects themselves. Store a handle to a stateful session bean that maintains the user s session information. The last guideline may be a point of contention for some, but there is a good reason behind it: most production performance problems that result in application server crashes are OutOfMemoryError errors. My experience has demonstrated that the biggest cause of OutOfMemoryErrors in enterprise Java applications is the presence of a large number of heavy sessions; sessions impact memory requirements in direct proportion to the number of users in your application, including phantom users lingering for the duration of your session time-out. Stateful session beans are maintained in a cache with a predefined and specific upper limit
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

212 CHAPTER 8 (Php web hosting) HIGH-PERFORMANCE DEPLOYMENTS Figure 8-4.

Monday, July 23rd, 2007

212 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Figure 8-4. Replicating a primary server to all other servers (as secondary servers) The technical steps that the failover process implements are defined as follows: 1. The load balancer is configured using sticky sessions, meaning that it sends a user back to the same server instance every time. 2. Whenever a session object is updated, the primary server sends the updated session object across the network to the secondary server. 3. If the primary server is not available, then subsequent requests are sent to the secondary server. 4. The secondary server now becomes the primary server. It selects a new secondary server of its own and replicates its session information to its secondary server. This process obviously incurs additional overhead in transmitting session information across the network, but it allows your users to cleanly fail over from one server to another. As servers go up and down, your users are not affected. Technical Requirements To facilitate failover and clustering, your session information must be serializable. Serialization is the process of writing or reading an object to or from a stream. For example, you can serialize your object to disk through an OutputStream and subsequently rebuild the object by reading it through an InputStream. In technical terms, an object must be marked serializable by implementing the marker interface java.io.Serializable. A marker interface is an interface that has no methods and exists only to label a class as participating in a specific role. Although java.io.Serializable is a marker interface, it is a special interface type, with default methods that facilitate the physical reading and writing of the object from and to a stream, specifically the following: private void writeObject( java.io.ObjectOutputStream out ) throws IOException private void readObject( java.io.ObjectInputStream in ) throws IOException
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Web server iis - CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS of your tuning

Sunday, July 22nd, 2007

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS of your tuning capabilities. This separation alludes to the core precept in the wait-based tuning hardening phase: requests should wait at the appropriate place. For example, a request being serviced directly by the dynamic Web tier should not take resources away from the business tier, as it would slow down the business tier and affect the performance of the entire application. Software Clusters Now that you have physically separated tiers appropriately to satisfy your business domain, you next need to determine how you are going to address failover. When an application server crashes or is restarted, such as for maintenance, is user session information preserved, or is the user forced to re-create it (for example, by logging on again or redoing previous activities)? If you require application failover or user session information to be preserved when an application server goes down, then the solution is to configure application server instances to run inside a cluster. When application servers run in a cluster, they work together to service requests as one logical unit. Furthermore, each application server is configured to replicate its session information to one or more secondary application server instances. Different implementations are available that vary from replicating to a single secondary server to replicating to all servers in the cluster, and your choice of implementation depends on how much risk you are willing to tolerate. Replicating to all servers is the least risky approach, but it incurs the most overhead. In practical terms, replicating to a single secondary server that resides on a separate physical machine suffices for 90 percent of use cases. It enables your application to be resilient to application server outages as well as hardware failures. Figure 8-3 illustrates replicating a primary server to a single secondary server. In this scenario, server 1 replicates to server 3, and server 2 replicates to server 4. This is the most efficient configuration because it is resilient to application server crashes and hardware failure, but at the cost of maintaining data to a single application server instance. Figure 8-3. Replicating a primary server to a single secondary server Figure 8-4 illustrates replicating a primary server to all other servers (as secondary servers). In this scenario, all servers replicate to all other servers for example, server 1 replicates to server 2, server 3, and server 4. While this is the most resilient form of failover (no matter what application server or machine fails, the failure is not apparent to the user), it is also the most expensive in terms of performance.
You want to have a cheap webhost for your apache application, then check apache web hosting services.