New Oracle WLS 11g (10.3.4), OSB 11g and Cloud Courses

I will offer a number of courses and workshops during the following weeks in right in the center of Munich. As usual all course dates and details will be announced on my mailing list. Right now it is the perfect time to subscribe to the mailing list if you haven’t done yet (there is approx. 1 announcement per quarter, of course you can unsubscribe any time).

 

The following courses are planned:

Feel free to contact me directly for other trainings or different locations (all courses are available word-wide),

have a great week!

Rackspace uses Akamai now

Rackspace is changing its CDN partnership from Limelight to Akamai.

My book “Middleware and Cloud Computing” covering Rackspace Cloud and Cloud Files with the classical Limelight CDN as well as Amazon CloudFront gives a striking example of the importance of CDNs in modern system architecture. Often CDNs replace the front-end web servers for a cluster of application servers. Compared to offloading static content to web servers, CDNs are more scalable, provide lower latency for the clients because of the many cache locations and require no administration.

Many European companies that I know of are using Akamai already so moving to Rackspace Cloud becomes a much smaller step for them.

Announcement: Winners of the Cloud Book Raffle

Yes, it took me a while for this announcement. Books are surprisingly time consuming even after they are written. Yet the two copies of my book

“Middleware and Cloud Computing”

are already on their way to the happy winners:
- T. K. from Xensio (DE)
- E. F. from Sunrise (CH)

Congratulations :)

And a Merry Christmas to all of you!

P.S. An official announcement of the book will follow. It’s available in the US and can be ordered in DE and UK.

PP.S. We are almost living in 2011. Marketing is changing. Show the world that you LIKE the book’s web site. Spread the word, invite your friends, tell your colleagues. There will be more stuff to be won… Cheers!

Come to my Cloud Computing Talk at DOAG 2010

Come to my Weblogic and Cloud Computing talk from 15:00h – 15:45h
in room Kopenhagen.

- Win a copy of my Oracle Cloud Computing Book!
- Learn how to use a computer in the cloud for one year for free!
- Understand WebLogic showstoppers in public clouds and design tradeoffs for clustering, JMS, load balancing, CDNs and databases.

Win a Copy of Middleware and Cloud Computing Book

If you are interested in Middleware and Cloud Computing subscribe to my my newsletter and win one of the first two copies of my brand new cloud computing book. The drawing will be Dec. 15th 2010.

There are only 4 mailings per year and you can unsubscribe any time from the newsletter.

Oracle Middleware and Cloud Computing Book

AWS Relational Database Service (RDS): Read Replicas & Multi-AZ Instances

Friday morning. Second cup of coffee. I remember the discussion I had yesterday about the differences of RDS read replicas vs. multi-AZ instances in the Amazon compute cloud.

Actually these concepts are completely different. So it is important to pick the right one that supports your design. Here is a short comparison:

Multi-availability zone instances Read replicas
Purpose Availability Scalability
Number of copies 1 primary + 1 secondary 1 primary + n secondaries
Secondaries used during normal operation? No Yes
Synchronization Synchronous Asynchronous
Use with ELB No (only one active) Not supported
Use with elastic IPs Not supported Not supported
Cost Doubles Per Instance

And don’t forget you can use a combination of both.

Amazon AWS vs. RackSpace Cloud Windows 2008 I/O Test

I did a basic test trying to measure the un-tuned out-of-the-box I/O performance of Rackspace Cloud instance with the HDTune utility on a Windows Server 2008 instance. According the the RS documentation their disks are local RAID10. Then I run the same utility on 8 core extra large  EBS backed EC2 instance provided by Amazon (wanted to make sure it is not an issue due to a small EC2 instance size). According to the docs EBS should provide consistent performance of a SAN regardless of the instance type.

Here are the somehow surprising results. I was expecting, that they perform somehow equal but RS is in the range of 300 MB/s whereas the EC2 instance is below 40 MB/s.

Rackspace Cloud with Windows 2008:

AWS with Windows 2008:

Interesting enough also the CPU usage is quite different: 2% only for AWS and 31% for RS.

I welcome any comments and I am aware that the tool is meant to measure disks and not RAID or SAN volumes. Still I am surprised by the huge difference. I wonder if the difference is only due to the difference of local RAID vs. SAN. Also I wonder how is the SAN attached then, since the SAN performance is still worse than my laptop disk.

WebLogic 11g Overload Protection in the Cloud

WebLogic Overload Protection and OFM

[NEW in 2011: For more details please take a look at my book Middleware and Cloud Computing.]

Even when running your application in the cloud with the most careful capacity planning in place, autoscaling enabled, carefully tuned, well-written and load tested applications without any design flaws you better prepare yourself for instantaneous growth.

There is number of core WebLogic settings as well as various settings for the individual subcomponents of WebLogic such as JMS or JDBC that enable you to limit the effect of excessive load. I recommend to use the following enumeration of topics as a checklist for your own WebLogic settings. All of these settings apply to non-cloud environments as well.

The basic settings make sense for other Oracle Fusion Middleware products  as well which are running on top of WebLogic. Examples for these products are Oracle BPM, Service Bus, Service Registry and so on.

Some of these settings are documented at Oracle as well, but most are scattered throughout the PDFs.

Certainly there is much more to overload protection in the cloud such as dealing with offensive traffic from attackers, system architecture issues such as distributed JMS in the cloud or a service oriented application design that allows to dynamically disable non-critical parts of your application if  Armageddon is close to peak.

This article is a shortened excerpt from my upcoming cloud computing book.

Enable WebLogic Administration Port

Enabling the administration port is not the same as setting a port number for the admin server. Enabling the administration does the following: It reserves a thread and a separate port number for all administration communication within a  WebLogic server domain, enables SSL and disables non-SSL administration communication. Using the administration port feature increases the likelihood that admin server communication will be functional under high load.

Workmanager Capacity Constraint

WebLogic uses work managers with a variable and self-tuning number of worker threads. There is a default work manager but you can define your own work manager and assign a particular application or even a part of it such as a JSP to your custom work manager. When configuring a custom work manger you can add restrictions such as the minimum or maximum number of threads, a fair-share usage policy or a capacity constraint. The capacity constraint defines the maximum number of requests that can be queued or are executing at any given point in time.

Incoming requests that exceed the number of execute threads will be queued.

Incoming requests over the capacity constraint are rejected and result in a “503- Service Unavailable” response code for web applications. This capacity constraint can be shared across multiple work managers.

Maximum Request Queue Length

You can define a maximum queue length shared across all work managers with the setting “Shared Capacity For Work Managers” field in the WebLogic admin console. The default value of this field is 65536. This setting does not apply for the administration port, so you will not risk the access to the admin server even if the maximum number of requests queued is reached.

Maximum Thread Setting

Although the work managers use a self-tuning thread pool it is still possible to limit the upper bound of the pool. Note, that in general I reckon that the self-tuning work manger is doing fine and I do not recommend to set a maximum number of threads. However if your load test reveals that an excessive amount of threads will make your system slow or unstable, you could try to run your load test with a maximum constraint for the thread pool.

There is no way to set the maximum thread count directly from the WebLogic admin GUI, but you can provide an additional startup argument in your server start script:

-Dweblogic.threadpool.MaxPoolSize=500

You can achieve the same by editing the WebLogic config.xml in the config subdirectory of your WebLogic domain. Add the &ltself-tuning-thread-pool-size-max> element with the maximum number of threads to the <server> element. As always, make a backup copy and stop the admin server first before editing the config.xml because a running admin server will overwrite your changes.

Maximum Heap Setting and Panic Setting

Define the maximum heap size for the JVM with the –Xmx parameter. The maximum heap should never exceed the available physical memory in your machine since pageing for virtual memory will slow the system down extremely.

Define which percentage of free heap triggers an out of memory situation in the WebLogic admin console under Configuration / Overload. The “Panic Action” setting defines what action will be taken if an out of memory situation occurs. The default setting is “Ignore, take no action”, but you can change it to “Exit the server process” and let the nodemanager restart your server.

Restrict the number of HTTP sessions

For a WebLogic web application you can limit the maximum number of HTTP sessions created by setting the max-in-memory-sessions tag within the session-descriptor of the weblogic.xml file. Otherwise creating more and more sessions due to user requests can eventually cause an out of memory. When this number is exceeded, an weblogic.servlet.SessionCreationException is thrown for further attempts This setting applies to both replicated and non-replicated in-memory sessions.

Define JMS quota

Limit the number of pending JMS messages on a particular destination (queue or durable topic) by specifying a quota. Use a quota resource that defines byte and messages maximums and assign the quota to the destination.

There is also quota for destinations that do not explicitly set a value, these destinations share the quota of the JMS server

Specifying a Blocking Send Policy on JMS Servers

Specify for blocking sends whether all send requests for a particular destination are queued until space is available (FIFO setting). Then, no send request is permitted to complete when there is another send request is waiting for space.

With the preemptive setting a blocking send can preempt other blocking send operations if there is sufficient space available.

JMS Message Buffer Size

The Message Buffer Size option specifies how much of the heap memory JMS will consume to store message bodies before they are paged out to disk. There is a default for this setting of one-third of the maximum heap size for the JVM, or a maximum of 512 megabytes.

Writing JMS messages to disk will slow down JMS but prevent an out of memory. You trade in performance for stability.

Maximum Number of JDBC Database Connections

Set the maximum number of connections to the value determined by load testing the application (maximum number determined during load test plus some headroom). Set the initial size of the connection pool to the number of used connections.

Note, that the WebLogic JDBC pinned to thread feature is particularly dangerous in overload situations. With pinned to thread enabled for a connection pool the connections are not returned to the pool but remain attached to the execute thread. The pinned to thread feature will save connection wait time if there is a high competition for database connections for a busy connection pool but the number of database connections increase beyond the maximum number of connections set for the connection pool.

WebLogic Whole-Server Migration on EC2 Cloud?

WebLogic whole-server migration is a compelling solution for the availability of servers and pinned resources such as JMS  on those servers. It simply moves the IP address to the new candidate machine before starting the managed server there. From the perspective of the managed server there is no change at all, since even the IP address is the same. The crucial point however is the availability of floating IP addresses that can be automatically reassigned by the wlsifconfig.sh script.

On EC2 there are only two IP addresses per instance, a public and a private one. You cannot get additional IP addresses, so whole-server migration isn’t of much use.

In fact, you could get an elastic IP address, which is a reassignable, static IP address assigned to an EC instance. Still an elastic IP is not useful for server-migration because assignment of the address requires the EC2 command-line and cannot be done directly from the cluster script using ifconfig.

This text is a digest of my upcoming book about cloud computing with Oracle.

Access the RackspaceCloud via NX

Sometimes you wish there was a Linux desktop image – but there isn’t. Typically all RackspaceCloud Linux images are server images without Gnome, KDE or even X11. It is still possible to install a desktop together with NX server (NX is a compelling alternative to using vnc) to get to the remote desktop on such a server image. The following lines list the necessary steps. There is a detailed instruction explaining how to get VNC running on RackspaceCloud / Ubuntu. I tried the following steps with RackspaceCloud and documented them here. Part of this information is taken from Eric Hammonds blog about EC2 and Ubuntu.

To start with, I found there is a problem with the locale setting  in Ubuntu 9.10 from Rackspace. You need to install the language pack first and then reconfigure the locale:

apt-get install language-pack-en-base
dpkg-reconfigure locales

You better test it with, e.g. with perl -v which shouldn’t complain about any locale settings anymore.

After that, create a new user “ubuntu” and set a password. The ubuntu user will be used to connect to the remote desktop once everything is set up correctly:

sudo useradd -d /home/ubuntu -m ubuntu
passwd ubuntu new_password

Installing NX involves three packages. It is no big deal to install manually, but there is a script available at Alestic written by Eric Hammand that I will use to install all of them. You can even run this script remotely with a little utility called runurl. So if you like, get the runurl utility and make it executable:

wget -qO/usr/bin/runurl run.alestic.com/runurl
chmod 755 /usr/bin/runurl

Copy and paste the following URL run.alestic.com/install/desktop to  your browser to see the details of the script you are going to execute. If you feel uncomfortable executing a script which is hosted at some remote site, then go and copy the script or simply cut and past the commands.

Then run the script by executing the following command:

runurl run.alestic.com/install/desktop

The script will need a couple of minutes even on a fast machine. It download and installs the gnome desktop with the NX environment for the server.

At the end double check the file /etc/ssh/sshd_config contains the following two lines, if it doesn’t, correct it:

# Change to no to disable tunnelled clear text passwordsPasswordAuthentication yes
AllowUsers ubuntu

For Rackspace Ubuntu image, I also had to add the following entry to the hosts.allow file:

sudo echo 'SSHD: ALL' >> /etc/hosts.allow

After that, restart ssh with: sudo /etc/init.d/ssh restart

Then start and configure the Gnome desktop and X-server:

sudo /etc/init.d/gdm start
sudo dpkg-reconfigure xserver-xorg

To tell you the truth, depending on the Linux distribution, the way the distribution was built, and the cloud environment, it is easy to spend hours debugging connections problems with the UNIX desktop. The other solution, using ssh, be it from cygwin, or even better a real Linux with X-forwarding is typically easier and faster.

Client

That’s it for the server site. On the client site get a NX client and enjoy.

RackspaceCloud Support for MultiCast?

A WebLogic server cluster used to use IP multicast (MC) for cluster heartbeats and global JNDI updates. Today there is another option with Unicast. Still large cluster deployments benefit from multicast. Often using MC is problematic, there is a whole list of possible problems with Windows, routers and firewalls swallow the MC packets (by design, unless you configure them otherwise) and on Unix it could be disabled for the NIC. Apart from WLS clustering it is used by products such as TIBCO EMS for failover.

I had an excellent discussion with the support team of RackspaceCloud about using IP multicast. “There is no obvious reason why it shouldn’t work“, they told me, but at the end there was some doubt left. Since I know AWS doesn’t support MC on EC2 I decided to give it a try.

How to reproduce

  1. Launch two instance in RSC. Should take some 3 minutes. 1 went for a 1GB Win2008 because I wanted to check for poetential Win problems. Note: Currently you cannot create an image from a Windows server, that’s why I started two images from the very beginning, otherwise it makes more sense to prepare one and then clone it.
  2. I downloaded Mozilla FireFox because InternetExplorer drives my crazy with all its security fuss when doing a simple proof of concept.
  3. Download and install WLS10.3.2
  4. I turned off the Win firewall just in case. I don’t wanted the firewall to block the MC packets.
  5. I shared my WebLogic installation directory and copied it over. Yes, you can do that in the RS cloud and at least for a POC it saves a lot of time.
  6. Open a cmd prompt cd to server\bin and run the setWLSEnv to set the environment:

    C:\Oracle\Middleware\wlserver_10.3\server\bin>setWLSEnv.cmd

  7. Repeat step 2 to 6 on the other instance, then run the MC test utility on both sides using a different name with -N, e.g use -N Tom on the other side:
    C:\Oracle\Middleware\wlserver_10.3\server\bin>java utils.MulticastTest -n
    Frank -A 237.0.0.1 -P 8001
    ***** WARNING ***** WARNING ***** WARNING *****
    Do NOT use the same multicast address as a running WLS cluster.
    Starting test.  Hit any key to abort
    Using multicast address 237.0.0.1:8001
    Will send messages under the name Frank every 2 seconds
    Will print warning every 600 seconds if no messages are received
     I (Frank) sent message num 1
    Received message 2 from Frank
     I (Frank) sent message num 2
    Received message 3 from Frank
     I (Frank) sent message num 3
    Received message 4 from Frank
     I (Frank) sent message num 4
  8. If MC was working correctly you’d expect to see your own messages as well as the messages from the remote side, but we just seeing the local ones.

Conclusion: there is no support for Multicast between two instances in the RackspaceCloud. The RSC support team officially confirmed that later as well :” Unfortunately, multicasting is disabled on our hypervisors to preserve network sanity. We apologize for the inconvenience.

So what?

Note: Oracle states MC is not working for AWS either and the preferred solution is Unicast (which is acceptable IMHO).

How to Connect to the Cloud

Quite often I chat with customers about cloud computing and tell them they could have a server running in the cloud for as little as 1 cent per hour.  Then their next question is: “Well, if it is running in the cloud, how can I access it then?“.

There seems to be a lot of confusion about it. Just because your server is running in the cloud, doesn’t mean it is not tangible. So the short answer is: “Use ssh and connect to it.“. Your server is not hidden in a nebula – it’s fully connected to the internet (at a fantastic bandwidth, a WebLogic 10.3.2 package download is completed in 4 mins at 3.8 MB/s) . For Amazon’s AWS you typically have to provide a X.509 certificate and RackspaceCloud uses password for root login with ssh.

Windows Options

Even if your managing the cloud from your Windows desktop you are not out of luck connecting to a UNIX server in the cloud, there are a couple of options:

  • There a free version of VNC for private and commercial use which is called TightVNC, see http://www.tightvnc.com.
  • NX is a desktop virtualization solution from a company called NoMachine. NoMachine designed the NX libraries to provide a self-tuning protocol with compression and reduced round-trips for X11 even over slow connections. Have a look at their homepage under http://www.nomachine.com. They provide a free version which is limited to two connections only.
  • FreeNX was created in 2004 as the first complete free and GPLed server implementation of NX, see http://freenx.berlios.de.
  • Cygwin is another solution, see http://www.cygwin.com. It provides a UNIX environment for Windows and comes with a X-server that can display your X based applications on your UNIX host. The software was written by Cygnus Solutions which now belongs to Red Hat.