Posts

Showing posts from October, 2012

Load Balancing on Web Application server clusters

Image
Overview A cluster is a group of servers running a Web application simultaneously, appearing to the world as if it were a single server. To balance server load, the system distributes requests to different nodes within the server cluster, with the goal of optimizing system performance. This results in higher availability and scalability -- necessities in an enterprise, Web-based application. High availability can be defined as redundancy. If a single Web server fails, then another server takes over, as transparently as possible, to process the request. Scalability is an application's ability to support a growing number of users. If it takes an application 10 milliseconds(ms) to respond to one request, then it should take 10 ms to respond to 10,000 concurrent requests. Of the many methods available to balance a server load, the main two are: DNS round robin and Hardware load balancers. DNS Round Robin To balance server loads using DNS, the DNS server ...

How to create self signed certificates programmatically ?

The most common approach of generating a self-signed certificate is using the  java keytool. There may be a situation when you want to create a self signed certificates programmatically One approach of programmatically generating these self-signed certificates is through the Bouncy Castle API. To start with this, you need to have the Bouncy Castle jar in your classpath.(You can download it from here ) Steps to generate self signed certificate key: 1. Create a public/private key pair for the new certificate           KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");         keyPairGenerator.initialize(1024, new SecureRandom());         KeyPair keyPair = keyPairGenerator.generateKeyPair();   2. Create new certificate Structure         // GENERATE THE X509 CERTIFICATE         X509V3Certi...

How to generate Self-Signed Certificate Using keytool

Image
The example uses the keytool utility to create a new self signed certificate. Open the command console (Run as Administartor) on whatever operating system you are using and navigate to the directory where keytool.exe is located. Run the following command (where validity is the number of days before the certificate will expire): keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks  -keysize 1024 Fill in the prompts for your organization information.  This will create a keystore.jks file containing a private key and  self signed certificate.