| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| Architecture |
| --> |
| <html lang="en"> |
| <head> |
| <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> |
| <meta content="ActiveMQ's next generation of messaging" name="description"/> |
| <meta content="messaging,stomp,jms,activemq,apollo" name="keywords"/> |
| <meta content="Apollo" name="author"/> |
| <script src="../scripts/jquery.js"></script> |
| <link type="text/css" rel="stylesheet" href="../styles/impact/css/pygmentize.css"/> |
| <link type="text/css" rel="stylesheet" href="../styles/impact/css/site.css"/> |
| <title></title> |
| </head> |
| <body> |
| <div id="navigation"> |
| <div class="wrapper"> |
| <ul> |
| <li><a href="../index.html">Apollo 1.7.1</a></li> |
| <li><a href="../community/developers.html">Developers</a></li> |
| <li><a href="../community/index.html">Community</a></li> |
| <li><a href="../download.html">Download</a></li> |
| </ul> <div></div> |
| </div> |
| </div> |
| <div id="content"> |
| <div class="wrapper"> |
| <h1 id = "Performance_and_Scaling">Performance and Scaling</h1> |
| |
| <h2 id = "Performance">Performance</h2> |
| |
| <p>Apollo's performance is awesome considering it is using Stomp, a text |
| based protocol. See <a href="http://hiramchirino.com/stomp-benchmark/ec2-c1.xlarge/index.html">the STOMP benchmark report</a> |
| for detailed results.</p> |
| |
| <h2 id = "Scaling_Characteristics">Scaling Characteristics</h2> |
| |
| <p>There are many different extreme ways that a messaging system can be used. |
| Some folks like to:</p> |
| |
| <ul> |
| <li>connect a large number of clients.</li> |
| <li>hold a large number of messages in their queues.</li> |
| </ul> |
| |
| <!-- * move around large messages. --> |
| |
| <p>Apollo aims to support all those usage scenarios.</p> |
| |
| <h3 id = "Scaling_the_Number_of_Connected_Clients">Scaling the Number of Connected Clients</h3> |
| |
| <p>Apollo uses non blocking IO and a reactor thread model. This means that a |
| running broker uses a constant number of threads no matter how many |
| clients are connected to it.</p> |
| |
| <h3 id = "Scaling_the_Number_of_Queued_Messages">Scaling the Number of Queued Messages</h3> |
| |
| <p>Queues will swap messages out of memory when there are no consumers that |
| are likely to need the message soon. Once a message is swapped, the queue |
| will replace the message with a reference pointer. When the queue builds |
| a large number (more than 10,000) of these swapped out reference |
| pointers, they then get consolidated into a single “range entry” and the |
| pointers are dropped.</p> |
| |
| <p>When a consumer comes along that needs some of the swapped out messages, |
| it will convert previously consolidated “range entries” to a set of |
| reference pointers. The next reference pointers that the consumer is |
| interested in get swapped back as regular messages. This allows Apollo's |
| queues to hold millions of messages without much impact on JVM memory |
| usage.</p> |
| |
| <!-- This is still being cooked |
| ### Scaling the Message Size |
| |
| Big messages don't even make it into the JVM's memory management. The |
| contents of big messages received and sent using buffers allocated in a |
| memory mapped file. This allows the OS to efficiently manage swapping |
| those large messages to disk and it avoids churning the eden garbage |
| collection generation in the JVM. If 1 producer is sending 100 MB |
| messages to a consumer the JVM will not report any significant memory |
| usage. |
| --> |
| <div></div> |
| </div> |
| </div> |
| </body> |
| </html> |