AWS outage destroys EBS-based AMIs in Europe region

I always recommend to create your own EBS-based AMIs (e.g. for running complex software such as Oracle Fusion Middleware). This hold true for the classic AMIs as well as for the converted Oracle VM templates. Never rely on the existence of AMIs provided by Oracle because:

- Oracle can change or update (or remove) them any time.

- They often don’t exist for certain AWS regions, they are S3-based or only exist based on 32-bit OEL instead of 64-bit.

- Also, the AMIs provided often don’t exist for a specific version of Oracle products.

So always create your own copy! Yet here is something to consider:

AWS broke an EBS-based AMI of mine by deleting arbitrary block in the image. This is particularly annoying since there is no easy way to create an offline copy an EBS-based AMI. You could rsync the running image to local computer but there is absolutely no support to get this done in a user-friendly way from the AWS console.

The good: They informed me in time (being in Sydney if something happens in the EU regions gives you an advantage) and sent an apology. They also replaced the deleted blocks with empty blocks.

The bad: It cost me several days to create this AMI which was an OEL EBS-based, full-blown installation of Oracle SOA Suite 11.1.1.5 (I still have to check if it will be usable after a file system check).

For a more detailed explanation of what happened take a look at Amazon’s summary of the events. It summarizes to an error in the EBS software that was overlayed with a power outage in Dublin.

Hello Amazon: Why don’t you provide an easy way to have an offline backup of EBS-based AMIs for disaster recovery?

DOAG 2011 Konferenz Presentation

Looking forward to meet you all at DOAG2011. I’ll be giving a presentation as usual which was just accepted by the program committee. So don’t miss the lovely city, Nürnberger sausages, the Sauerkraut and of course my talk.

WebLogic JMS with SAF and JMS bridges or SQS : Legacy Integration in the Cloud with Oracle WebLogic, WebSphere and OSB / Apache Camel

An interesting question popped up on my Oracle Middleware and Cloud Computing book site which I like to answer here for the benefits of all the others puzzling at similar integration questions. In the context of using JMS as an integration technology I’d like to summarize the usage scenarios for Oracle WebLogic JMS Store-and-Forward and JMS-bridges (both are included in WebLogic server).

Hi Frank – [ ...] We have a requirement to build 2-way asynchronous integration between an application running on WLS in AWS and a legacy J2EE app running on IBM WebSphere in our Data Centre. From your excepts my understanding is that SQS is intended for use only between AWS apps – is this correct ? I think we need to be looking at a full JMS solution for our integration – perhaps using WLS JMS Store-And-Forward – Thanks, Peter D

Hi Peter,

Based on your comment I cannot go into great detail or even provide a solid architecture that anwsers you question (one that will save you from more reading) but here are some important points to consider:

- Amazon’s SQS is not restricted to be only used from AWS instances. SQS is purely based on web services (or language bindings that encapsulate those WS calls) so you can use it from any computer. E.g. you can read or write to SQS queues from remote.

- WLS Store-and-Forward (SAF) can only couple WLS instances of the same version and does not bridge to other JMS providers. You cannot use SAF to transfer from WLS JMS to IBM MQSeries (or whatever Websphere might use). JMS is a pretty bad integration technology which requires to have the right messaging classes in your classpath. E.g. when writing messages from Websphere to a WebLogic JMS queue you are required to have the WLS JMS classes in Websphere classpath.

-  You can use the WebLogic’s JMS bridge to solve the somehow messy classpath issues. WLS JMS bridge has to be deployed as JCA adapter (still the jar file from the other provider is required but it is not used in custom code). The bridge will automatically forward from e.g. WLS JMS to MQSeries and even supports transcations. However there is no support to bridge between WLS JMS and AWS SQS.

- Unlike let’s say Oracle Service Bus, if you are looking at Apache Camel there is support to convert incoming JMS messages to outgoing SQS. Note to Oracle’s product manager of OSB: we would appreciate to have SQS as a supported transport protocol or possibly as an SOA Suite JCA adapter. Thanks for considering it :)

regards,

Frank

Detect your Memory Leaks by counting Surviving Generations: Size matters!

The sunshine motivates me to run more these days. Just back from a beautiful run in Englischer Garten I am still sweating but I am also inspired by Rene’s article about JRockit that I read last night. It’s a very detailed article and well done – I tempted to write ‘as good as usual’ but I do understand how much work it is!

Java Memory Leaks

Most likely there is no training I do on behalf of Oracle without the subject “memory leaks”. So while still cooling down from my run, let me add a few points about memory leaks.

- Size matters. At the end it is all about size! Wasting 20 bytes due to a mem leak is bad. Yet 20 bytes don’t affect your system. I bet you will neither notice nor detect it.

Wasting 20 bytes in a loop that runs a million times makes you probably notice the leak. Running the same loop with the leak 10 million times might crash your appserver.

- Fast growth is not the issue. Slow growth is bad enough. Imagine you lose 20 bytes every minute. It’s a bit like a slow puncture tyre which constantly loses a bit of air. At the very end you sitting there with a flat tyre (Let me assume you life in a country with a mild climate and friendly people how will assist you to get the tyre changed quickly) . The same happens with your WebLogic heap. It’s not a lot of memory that you lose per time but it is the total size of the memory that is wasted over time. At the end your server will fail after three weeks (and WebLogic nodemanager restarts it for you :) ).

 

Don’t get me wrong. I am a big fan of JRockit, the team behind JRockit and its superb tools. Yet for a long time I wondered why JRockit’s memory leak tools still tries to detect “growth”.

Often I like to demo a 20 line Java program with 2 methods (mine is derived from the IBM page here, so you can get an idea). One method is consuming a lot of memory. The other one is losing 20 bytes every now and then. Of course the memory leak is within the second method, but JRockit tools detects the first method (which just happens to be mem intensive but correct).

Good news is: there is a better approach! It’s the kind of tools I love to explain in my workshops. Now it’s within the Oracle eco-system anyway but I used to spread the word long before.

Visual VM / Netbeans

VisualVM comes with your Sun JDK6 for free, originates from Netbeans, look for jvisualvm in JAVA_HOME/bin. It incorporates a memory profiler that uses a metric called “surviving generations” (or short “generations”). So what is a surviving generation?

Surviving generations:

The number of different ages for all objects allocated on the JVM heap since the profiling session started.

Age of object:

The age of the object is the number of garbage collections the object has survived.

 

Now the surviving generation metric is as good as it gets IMHO. A high number of SG tells that there is  a high number of objects created which are never garbage collected (which is the definition of a memory leak, isn’t it?).

VisualVM displays the surviving generations metric, so it is easy to hunt them down.

 

 

To conclude:

  • Does it detect the slowly growing memory leak in the example above? Yes, it does!
  • VisualVM is only part of the Sun JDK, not of JRockit. Since we are all one happy family now I expect it survives the merging of both JDKs (Oracle is doing pretty well with these descisions usually. Hello Oracle …). Just in case it doesn’t survive I will keep posting references to this blog entry :) .
  • Read more about JDK, WebLogic and monitoring (also the most important non-Oracle monitoring solutions) in my Oracle Middleware book.
  • I am regularly running a customized high-end Tuning, Sizing and Monitoring WebLogic workshop myself (preferably in Munich or Sydney). Drop me an email if you are interested.
  • I am off for a shower and the second coffee of the day. Enjoy the sunshine!

A live update on this from Oracle Open World 2011 as of Oct 3rd 2011. I just spoke to the tech lead of JRockit, Marcus Hirt, asked him about the support of surviving generations in the Jrockit Mission Control tooling for the merged JDK 7. His answer (with a very sympathic grin in his face) was: “Stay tuned…”.

 


Oracle InSync2011 Conference in Sydney

 

  • It’s confirmed now. I will give a presentation at AUSOUG’s InSync2011 conference 16th / 17th August 2011. My talk is about cloud services. Really looking forward to be in Sydney again.
  • Right after the conference I will be offering an Amazon Cloud workshop/training centred around Oracle Fusion Middleware. Learn how to do real cloud computing with WebLogic right now (including elasticity, load balancing and database as a service). Bring your laptop – no need to bring your Exalogic machine for this…

 

 

RDS: Real Cloud Computing with Oracle Databases

When designing your cloud architecture sooner or later the question about the database will arise. Today Amazon Web Services announced the availability of Oracle database instances provisioned with the AWS Relational Database Service (RDS). However, there are many other options available, and in order to make an informed decision as to which will best suit your architecture, you should know the pros and cons of at least four:

  • You can start installing your database on an AMI with the operating system of your choice, or even select an AMI provided by Oracle and set up the included Standard or Enterprise Edition.
  • SimpleDB is an option if you prefer the scalability and availability of a non-relational database.
  • The relational database service from AWS offers a convenient and easy way to create and manage an Oracle MySQL database as a cloud service.
  • Starting today you can use RDS to create an Oracle database. So for the first time in the short history of cloud computing a licensed Oracle database can be used in the cloud with a pay per use model! You pay the database instance per hour used (or bring your own license)- and only this is real cloud computing.

I summarized my view in a detailed 12 page whitepaper (the weather here is too nice and I can’t bother myself putting all the screen shots into this blog posting).

The PDF describes all the details of RDS and compares them to the other options available. Also learn how to use WebLogic with RDS:

Cloud Databases and Oracle Whitepaper.

If you like to know more after reading the whitepaper have a look at my Oracle Cloud Computing book at Amazon and join the book’s Facebook site!

Ebook Released: Middleware and Cloud Computing

 

 

 

 

 

 

 

 

 

 

After a couple of fun days playing with (mostly disastrous) tools, converters and the Kindle itself I published the first Kindle edition of “Middleware and Cloud Computing”. It contains more than 100 coloured graphics (well, of course they are not coloured on your b/w Kindle, but on the Kindle reader for your Mac, PC, Android, iPad etc) and more than 100 clickable links to additional resources, publications and tools.

Please spread the word, twitter it to the networked part of the known universe and don’t forget to LIKE its Amazon and Facebook site. Do you you really, really want to support it? Sincerely? The best you could do is writing a review once you have read it.

 

thanks and best wishes,

Frank

WebLogic JMS Topics, Oracle Service Bus, and AWS Simple Notification Service (SNS)

AWS Cloud Service: Simple Notification

This is a shortened extract of my my book Middleware and Cloud Computing

If you like it, you can get it from Amazon or subscribe to its Facebok site!

 

 

AWS Simple Notification Service (SNS) is a publish/subscribe service for notifications in the cloud. The scope of SNS is much broader than that of monitoring and it’s a good starting point used in combination with the CloudWatch to implement custom monitoring and notification. To use SNS, create a topic with the AWS management console or the SNS API. Clients interested in this topic subscribe to it, and whenever a notification is published to the topic, SNS will push it to all subscribers.

SNS supports a variety of transport protocols for the subscriptions:

  • HTTP(S) using POST
  • Email
  • Email with JSON format
  • SQS

Different subscribers can subscribe to a single topic using any of the listed transport protocols.

Topic names must be unique within an AWS account and their length is limited to 256 alphanumeric characters and hyphens. Within the AWS infrastructure there is no single point of failure for SNS: messages are stored redundantly across multiple availability zones. SNS attempts to deliver the notifications in order, however, due to network issues this cannot be guaranteed. The maximum message size is 8KB.

Examples for using SNS

SNS is an attractive cloud service that delivers all the functionality necessary to develop a monitoring solution similar to the notifications of WebLogic Diagnostic Framework. Unfortunately, the AWS management console doesn’t integrate SNS with CloudWatch yet. You have to use the CloudWatch command-line (or write your own code) to trigger an SNS notification if a CloudWatch metric is above a configured threshold.

SNS is more general and can be used for tasks other than sending notifications based on monitoring data. Thanks to the email transport protocol for subscriptions it is rather easy to build your own newsletter system based on SNS. Would you feel more relaxed if you knew that you would receive an email if your AWS fee has exceeded a certain amount? You can easily implement a process that retrieves your account usage and then triggers an SNS notification to an email subscriber if things get too expensive.

In general, you should regard SNS as a generic notification service that can be used by all kinds of applications in the AWS cloud so the applications can interact with each other.

Best effort

Protocols such as email or HTTP are inherently unreliable, and there is no retry count for notifications that SNS couldn’t push to the subscriber. The notification delivery semantics of SNS is best-effort: There is no guarantee that your notification will ever be delivered. Don’t use SNS to build systems where the delivery of notifications is essential.

SNS is integrated with the AWS management console, but usually  you won’t be using SNS from the console, but from your applications or within custom tools.

SNS Topic

SNS APIs

There are SNS software development kits for Java, .NET, and PHP available for downloading at the following Amazon site:

http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=314

SNS is also supported by the popular open source library Typica. For an example about how easy it is to SNS with Typica have a look at the following Java class:

http://typica.googlecode.com/svn/trunk/test/java/TestSNS.java

 

SNS versus SQS

Simple Notification Service and Simple Queue Service are both messaging systems. SQS implements a one to one message pattern with at least once semantics and polling for the receivers. In contrast to SQS, SNS sends a notification to many receivers with best effort semantics for the message delivery. SQS is not integrated into the AWS management console. In contrast to SNS, where messages get lost if the receiver is not available, you can use SQS to decouple systems because the messages are stored persistently until they are retrieved.

Table 12: SNS with SQS Comparison

SNS SQS
Message pattern 1 to many 1 to one
Purpose Notifications Reliable Messaging
Message semantics Best effort At least once
Similar to JMS topics JMS queues
Message delivery Pushed to receiver Receiver poll
Maximum message 8 KB 64 KB

Integration with SQS

You can forward an SNS notification to an SQS queue. The publish method of SNS is synchronous, meaning that it only returns after the notification is pushed to the subscriber -which in this case means the message is stored in the SQS queue. Once the notification is placed in the queue you will benefit from the at-least once delivery semantics of SQS.

SQS is only used programmatically. To create an SQS subscription you have to subscribe to the SQS queue with the Amazon resource name of the queue. In addition, you have to set the access control policy of the queue to allow SNS to send notifications to the queue.

Integration with Oracle Service Bus

Did you ever wonder about how to bridge information from AWS to OFM? Connecting Oracle Service Bus with SNS directly, is possible with HTTP, or can be done indirectly over email. For a direct connection, create an OSB proxy service with the transport protocol HTTP, and register it as an SNS subscriber.

Pricing

There is a free usage tier for 100,000 SNS requests, 100,000 SNS HTTP(S) notifications, and 1000 email notifications.

Beyond the free tier Amazon will charge you for the API requests and notifications.

Oracle WebLogic JMS Queues or AWS Cloud Simple Queue Service (SQS)

This is a shortened extract of my my book Middleware and Cloud Computing.


AWS Simple Queue Service

Amazon’s Simple Queue Service (SQS) is a cloud service for reliable messaging. The SQS service with its queues is located off-host. So, similar to the elastic load balancing service, or the relational database service, you can use the service without having to start an EC2 instance.

Features

SQS is available in all four AWS regions with the same pricing. All regions are independent of each other so messages can never be in-between regions. Queue names have to be unique per region.

Highly available

Queues are highly available: Messages waiting in queues for their delivery are stored redundantly on multiple servers and in multiple data centers.

Unlimited
queue size

There is no limit for the number of messages or the size of a particular queue. One message body can be up to 64 KB of text in any format (default is 8KB). For larger messages you have to store the message somewhere else reliably, e.g. in S3, SimpleDB or RDS, and pass around a reference to the storage location instead of passing the message itself.

Message expiry

When a message remains in a queue (because there is no receiver removing the message from the queue), the message expires after a default of four days (or a configurable maximum of 14 days).

After receiving a message from a queue, the message is locked for a configurable timeout. While the message is locked it is invisible to other receivers. SQS uses this mechanism to ensure that messages are delivered once.

It’s the receiver’s responsibility to explicitly delete the message when it is processed successfully. If the receiver fails before it is able to delete the message, then the message becomes visible again after the timeout, and another receiver can receive it.

Access to queues is restricted to the AWS account owners, but you can specify in an access policy statement that a queue will be shared.

No
compression
or encryption

Encryption is not a built-in SQS feature, but depending on your privacy requirements you can consider encrypting the content of your message at an application level. Also, there is no built-in compression feature, but you can compress large messages at an application level before sending them.

At least once
semantics

The message delivery semantic is engineered to be “at least once”. This means your applications have to cope with message duplicates.

 

Usage

Access to SQS is purely programmatic. Currently, there are no command-line tools from AWS, and there is no integration for SQS into the AWS management console yet.

There are language bindings for Java, PHP, Perl and C#. Also, the Java Typica library supports SQS.

SQS is ideal for decoupling systems or applications running on EC2. From a design perspective, SQS has many features in common with JMS queues. The most important differences between SQS and JMS queues are listed in Table 1.

Table 1: SQS Comparison with WLS Queues

SQS Queues WebLogic JMS Queues
Max queue size Unlimited Limit depends on JVM heap and persistent store
Best Quality of Service At least once Exactly-once
with transactions
Configurable retries No Yes
Persistence Always Optional
Scalability Inherent With distributed queues
Availability Inherent Whole-server migration 

or JMS service migration

Message Order Not guaranteed Can be enforced even for distributed queues
Configurable quotas No Yes
Configurable flow control No Yes
Auto acknowledge No Yes
Time To Live configuration 1h to 14d 1 ms to ca. 2 mio years
Max message size 64 KB Unlimited,
default is 10,000 KB
Compression No Yes
Billing Free usage tier, then charged per request and data transfer amount Included with WLS

Conclusion

To conclude, SQS is an AWS cloud service that could replace WebLogic JMS queues.

Compared to JMS queues, SQS has fewer features, no auto acknowledgement of messages and no support for exactly-once message delivery. The advantage of SQS over JMS queues is SQS’ inherent availability, the virtually unlimited storage for messages and the zero configuration.

The inherent availability is an especially important factor to consider when deciding between SQS or JMS queues, because the built-in features offered by WebLogic for achieving availability of JMS are restricted in today’s clouds.

SQS is implemented off-instance; therefore, its availability is not affected if a particular EC2 instance becomes unavailable.

SNS

Interestingly, there is a cloud service for the counterpart to JMS topics as well. The AWS Simple Notification Service allows you to send messages to more than one receiver using transport protocols such as HTTP, email and even SQS.

SQS vs. OSB

In case you are wondering how this relates to Oracle Service Bus: Comparing SQS with Oracle Service Bus is like comparing apples with oranges, because in addition to the built-in JMS, service bus also supports protocol adaption, message flows with content-based routing, and most importantly, it is configuration driven.

In a nutshell: SQS is a queue service for the AWS cloud to decouple systems with message passing. As a cloud service it abstracts the Java EE specific details of JMS – nevertheless SQS is specific to AWS. Currently there is no cloud messaging service offered for the Rackspace cloud. Using an AWS specific service like SQS increases the effort to migrate to another cloud provider (and limits your possibilities to quickly switch to another cloud provider as a part of a contingency plan).

Pricing

There is a free usage tier for up to 100,000 requests per month. Beyond that, Amazon adds $0.01 per 10,000 SQS requests to your bill.

In addition, you have to pay for the data transfer as shown the figure below. Only data transferred between SQS and EC2 within a single region is free. Data transferred between different regions will be charged at Internet data transfer rates on both ends.

 

 

More details on my Middleware and Cloud Computing book.

 

Amazon’s AWS outage – did the Cloud Fail?

 

There was a major outage in one of Amazon’s regions affecting several availability zones last Thursday.

- For a summary of the events and their impact see this blog entry of RightScale (I guess but I am not sure if it was written by Thorsten). The RightScale blog is updated now with some more details of the event.

 

- George Reese, the grand homme of Cloud Computing, calls this event a shining moment for clouds. Don’t get me wrong. I am big fan of George, not only because he is following me on twitter :) . He gave a podcast interview repeating that you need to design for the cloud by designing for failure instead of sticking with your traditional architecture.

- Amazon did an poor job communicating what happened. Failures are a part of business but they have to be dealt with accordingly. Add this to your lessons learned list about Clouds. At least I did. Here is their summary.

- In my Cloud Computing book there is a whole chapter about RightScale (who provided the best analysis so far) as well as a section about disaster recovery and another one on designing for clouds (“why it is not enough to simply run WebLogic on AWS”) . There is also a free chapter for download available at Oracle’s Archbeat site.

IMHO this event teaches us that it is not enough to know how to simply run WebLogic on AWS or any other IaaS cloud provider such as Rackspace. By the way, this is one of the reasons why my book has more than the initially planned 120 pages …

(almost) better than Swiss chocolate

 

 

 

 

 

Thank you SOUG for mentioning my book and sending me a fabulous hamper for my statement why I enjoy being a member of the Swiss Oracle User group. I enjoy it even more now – cheers!

Here is the winning statement (German only): http://www.soug.ch/

2-day Amazon AWS Cloud Computing Workshop / Training Course

For an updated version of this workshop see here or contact me directly.

I’ll be offering a 2-day cloud computing workshop 2+3. May 2011 in city center of Munich. A second event is planned for Sydney later this year and will be announced by the Australian Oracle User Group.

After a basic introduction and the discussion of common misconceptions we will cover advanced topics such as how to achieve true elasticity, load balancing in clouds, queueing, notifications and databases in clouds. This workshop is centered around Amazon Web Services (AWS) technologies such as EC2 EBS images, RDS, SQS, SNS, ELB etc.

The workshop includes a free copy of my Middleware and Cloud Computing book, printed course material, a pre-configured lab environment to take home as a virtual image on DVD.

Please contact me via email for registration and further details.

Reduce Costs Amazon AWS, Rackspace Cloud and other IaaS Providers

Anybody working regularly with IaaS providers such as Amazon or Rackspace can recount a personal story of a forgotten instance.

The most dramatic stories are not about a cheap micro instance – my personal story with AWS cost me some US$200 when I missed to turn off an EC2 instance and went for a diving trip to Egypt. I’ve got a number of suggestions that might save you some money.

 

  • Above all, you want to avoid paying for unused resources. Using auto scaling is a great mechanism for running only the required instances, and for example, to scale down at night when fewer EC2 instances are required.
  • Often the monthly bill tells you that there something is still running somewhere. Make sure you stop unused resources as quickly as possible. If you know in advance that you want them to be stopped at the end of the day, then use the Unix at command to schedule the termination of the instances.
  • Although AWS management console provides dashboards, there is no super-dashboard. Instead, you have to flip through all tabs yourself (starting from from the “S3” tab to “EC2” and all the tabs up until “RDS”). Only after checking all tabs can you be sure you have an accurate overview of the current resources for the selected region.
  • Remind yourself that the AWS management console is always displaying resources per region. Once you switch to another region, e.g. from Asia/Pacific to Europe, you will no longer be able to see instances running in Asia/ Pacific.
  • The console is sometimes out of sync. When this happens, remember to click on the refresh button so as to avoid only seeing outdated information.
  • The command-line tools I introduce later will work with resources for the default region in the US (unless you specify otherwise). Remain vigilant at all times e.g. when working in Europe do not start and then forget an instance in the US.
  • Always double check for running instances before engaging in another project, leaving for a sabbatical or a trip around the world.

Be careful and make sure you don’t wast money that is better spend for a fabulous diving trip.

These tips are taken out of my Middleware and Cloud Computing book.

 

Update as of May 2012:

You can setup billing alerts now for AWS and use SNS to recalculate your auto scaling. See Jeff’s posting on AWS typepad here.

Resize AWS EC2 Cloud Instances

Scaling for AWS and most other clouds is quite interesting. As I mentioned in my podcast on OTN and also in my “Middelware and Cloud Computing” book you cannot dynamically resize a running cloud instance. E.g. there is no API call to ask for 2.2 GHz CPU speed instead of 1.8 GHz or to dynamically add another 3.5 GB of RAM.

All you can do is switch to another EC2 instance type while the instance is not running. This is why I like to say scaling nowadays involves some granularity (since you can only select the next bigger/smaller instance).

It was alway possible to resize a stopped EC2 instance using

frank@ubuntu:~$ ec2-modify-instance-attribute i-d8bc3eaf –t m1.xlarge

Now this functionality was finally  included into the AWS Management Console. Jeff has a nice blog posting with many screenshots explaining how it works.

 

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

Amazon Simple Queue Service vs. WebLogic JMS Queues

I spent my late afternoon coffee break to compare Oracle WebLogic Server JMS queues with the Amazon AWS SQS service. Here are some preliminary results. Any comments are welcome!

SQS Queues WebLogic JMS Queues
Max queue size Unlimited Configure JVM Heap, JMS MessageBufferSize, JMS persistent store
Best Quality of Service At least once Exactly-once
with transactions
Configurable retries No Yes
Persistence Always Optional
Scalability Inherent Non-persistent messages, distributed queues
Availability Inherent Whole server migration

or JMS service migration

Message Order Not guaranteed Can be enforced even for distributed queues
Configurable quotas No Yes
Configurable flow control No Yes
Configurable Time to Live Yes Yes
Auto acknowledge No Yes
Time to live 1h to 14d 1 ms to ca. 2 Mio years
Max message size 64 KB Unlimited,
default 10,000,000 byte
Compression No Yes
Billing Free usage tier, then per request and data transfer. Included with WLS

Update: I published a longer article which is based on my 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.

Cloud Computing Workshop

UPDATE: 1-2 seats left as on Monday 27th.

Everybody will be offered to work with free  Rackspace, Amazon Web Services platform and Rightscale cloud management accounts provided for this workshop (some accounts will possibly be available for a longer period so you can continue to work with the results of the workshop !). We will also have a live video conference with at least one of the major companies in this area.



I am offering a unique cloud computing workshop Oct 4+5, 2010 in Munich, Maximilianstr. The workshop is cross-platform, vendor neutral and critical. There are only few seats left. Please contact me asap if you are interested. Target audience is senior managers / tech architects interested in advanced topics and hands-on experience.

- Enjoy the opportunity to get real hands-on experience with cloud computing and cloud management.

- The workshop provides a great overview but we will cover lots of advanced and difficult topics.

- Discuss an independent and critical analysis of the technology with colleagues from Germany’s top companies.

- Find out what Amazon Web Services, Rackspace and Rightscale offer (and what they don’t).

- Understand how cloud computing enables new opportunities for your business.

- Walk out with your own cloud image with customized software. Use it to start any number of instances. Highly available across availability zones, load balanced, auto-scaled with SLAs.

Preliminary Agenda

1. Cloud Computing

- Overview, Definitions

2. Rackspace

- Windows/Linux in the cloud
- Cloud Files and Limelight
- Rackspace tools
hands-on labs:

- Windows instance and performance test
- Cloud Files

3. Cloud Computing: Architecture and Design

(Amazon AWS used as example)
- Overview
- Cloud instances, configuration, image design: EC2
- Cloud storage: S3 and Elastic Block Storage
- Monitoring: Cloud Watch
- Scalability: Elastic Load Balancer, HAProxy, Content Distribution Networks
- Availability: Clustering in the Cloud, service- and server migration, overload protection
hands-on labs:
- Create your own images, snapshots, volumes
- Resize EC2 cloud instance
- Cloud Monitoring with Cloud Watch
- Elastic Load Balancer setup
- Autoscale
- Cloud Front configuration and perfomance test

4. Oracle in the Cloud

- Overview
- Possibilities and Showstoppers

5. Cloud Management

- Overview
- APIs, Issues, Tool overview
- Rightscale
hands-on lab:
- cloud management with Rightscale

6. Future Outlook


Bad news for those who were waiting for my cloud computing training day at DOAG 2010 conference. Unfortunately this event is cancelled by the DOAG. I will give a presentation at the conference instead.

New and Cool Features in WebLogic 10.3.3 / latest WLS 11g

NEW: For more details please take a look at the Oracle Fusion Middleware chapter in my book Middleware and Cloud Computing.

Some interesting features I personally like in WLS 10.3.3.

  1. The MBean attribute PlatformMBeanServerUsed default is true now. So you can see your WLS MBeans from a local JConsole (for WLS11g = WLS10.3.1 you had to enable this first)
  2. A new dashboard replaces the WLDF console extension. Good news:, there is no installation required. You can access it with admin:port/console/dashboard.
  3. The request performance for WebLogic Diagnostic Framework (WLDF) TraceElapsedTimeAction is displayed directly in the admin web console under Diagnostics / RequestPerformance
  4. A new TraceMemoryAllocationAction shows memory allocated during a method similar to TraceElapsedTimeAction. You have to enable WLDF with instrumentation for this deployment first.
  5. The beloved Pointbase that was bundled with WebLogic is gone. This was one of my predictions for 2010 (Oracle made it in time).  Change your demos to use the Java DB Derby instead. I have updated my WebLogic 11g training course already.

For all changes see the what-is-new-in-WLS10.3.3.