30
© 2009 VMware Inc. All rights reserved vFabric Deep Dive - Messaging James Williams Senior Systems Engineer (VMware) [email protected] November 30, 2010

vFabric Deep Dive - Messaging

  • Upload
    beth

  • View
    68

  • Download
    0

Embed Size (px)

DESCRIPTION

vFabric Deep Dive - Messaging . James Williams Senior Systems Engineer (VMware) [email protected] November 30, 2010. Open, Proven, Cloud Ready . Open, ubiquitous and adaptable. async. sync. unreliable. reliable. Source: TIOBE - 2010. - PowerPoint PPT Presentation

Citation preview

VMware presentation

vFabric Deep Dive - Messaging James WilliamsSenior Systems Engineer (VMware)[email protected] 30, 2010

2009 VMware Inc. All rights reserved#1

Open, Proven, Cloud Ready #Open SourceLanguage AgnosticAMQP(Advanced, Message, Queuing, Protocol) specificationMore useful than a JMS or MSMQ BrokerProven Government agencies, telecom, financial Reputation Reliable, fast and lightweightIt is popular in the cloudEasy to scale out

2Open, ubiquitous and adaptableSMTPAMQPHTTPIIOPunreliablereliableasyncsync#MQ Series is still king and has been since the early ninetiesJ2EE boom in the 2000s did not deliver a truly open platformIn 2006, JP Morgan open sourced AMQPAMQP provides Message Orientation (headers, priority, payload)QueuingRouting (P2P and Pub/Sub)Reliability Transactions, ACID broker semanticsSecurity 3Source: TIOBE - 2010

#TIOBE provides a programming language popularity indexNot useful in making enterprise development decisionsUseful in reminding Java people that we dont live in a Java only worldJava is king 18%, C 17%, .NET is around 11%VMware supports adapters for Java, C, C++, .NETCOBOL is suspiciously off the list (There is talk of supporting COBOL someday!)

480% of large, mainstream IT organizations depend on both .NET and Java Gartner 2010

#80% of large enterprises use both Java and .NET.NET is known for high developer productivity and super high vendor lockinJava is known for vendor freedom and low developer productivityBetter IDEs like STS are closing the gapInnovative frameworks like Grails/Roo/Seam are potential leap frog productivity playsRabbitMQ provides a great communication bridge for the two 400 pound guerillas in the Enterprise5

C# to SpringSpring to C

#6

New Product#7

Poised for Take Off

#RabbitMQ was acquired by VMware in April 2010In the last 5 years, RabbitMQs Erlang based broker has garnered a lot of attentionErlang was created in 1998 for telephony applicationsHigh concurrency with nine nines of reliability is the objectiveAmazon, Heroku(RoR hosting cloud) Nasa Nebula are key public cloud adoptersAT&T guys built an early admin console (Alice+Wonderland)Second Life game platform handles 3K messages per secondUsed for Indias ID management system (Over 1.1 Billion people)Packaged in most Linux distributionsThousands of known production uses (Production users can remain anonymous b/c software is Mozilla Public Licensed)8Poised for Take OffBackgroundAcquired by VMware in April 2010Over five years of R&D and Enterprise useErlang was created in 1998 for telephony applicationsCloud EnablerAmazon, Heroku, Nasa built public clouds with RabbitMQNoteworthy Enterprise UseAT&T is a key Enterprise adopter and contributorSecond Life game platform handles 3K messages per secondIndia ID management system (Over 1.1 Billion people)No Usage BarriersPackaged in most Linux distributionsIdeal for ISVs (MPL license)#9

Fast#RabbitMQ is fast10K+ messages per second is not hard to achieveOur test harness does 25K/sec on a single x86 quad core8GB RAM, 1GHZ class, co-locatedActual throughput is 50K/secThe NIC is usually the bottleneck10PerformanceCommodity Hardware 10 thousand messages per second is easy25 thousand messages per send is our test harness Performance TipsThe NIC is usually the bottleneckDo not benchmark in the cloudUse transactions only when necessaryConsider non-persistent queues Increase VCPUs and RAM allocations based on peak load

#11

Scalable

Secure#SecurityRabbitMQ implements AMQP security A broker can have many vhosts (hosts exchanges/queues/bindings)Three levels of permissions (configure, read, write)AMQP over SSL is supported

ScalabilityDesigned to scale horizontallyLots of little rabbitsDozens of clustered brokers are commonContext: 10 commodity x86 servers should comfortably support 250K messages per second, 21 billion messages per dayLargest known AMQP cluster is 60 billion messages per day12Scalability and SecuritySecurityRabbitMQ implements AMQP security A broker can have many vhosts (hosts exchanges/queues/bindings)Three levels of permissions (configure, read, write)AMQP over SSL is supportedScalabilityDesigned to scale horizontallyLots of little rabbitsDozens of clustered brokers are commonLargest known AMQP cluster is 60 billion messages per day

#13OldPCPCPCPCPCPCESBCentralized architectureSeductive, pretty pictureComplex ExpensiveHigh RiskBPELSCARegistryRules#Centralized every application must go through a single, mammoth broker suiteSeductive Point and click, drag drop, tool enabled governance and registries with fancy web service based BPEL sounds slickComplex Most vendors have a lot of acquired SOA point solutions that are cobbled into a suite. This makes for a very complex rollout. Expensive Oracle and IBM dont let you use just what you need. You buy the platform regardless of your needs.High Risk Most SOA initiatives fail because too much effort is spent trying to implement complex technology and application interfaces. The real challenge with SOA is not technical it is people based.14NewAMQPSpringSpringJMSSpringSpringFTPAMQPPCPCPCPCApplication centricDifferent from pure P2PEIP provided by SpringEdge based SOACompatible with centralized ESB#Application centric resembles a social network more than a centralized busDifferent from pure P2P built in support for pub-sub at the wire protocol or the developer API level.EIP Provided by Spring There is no need for a dedicated ESB.Edge based SOA A term that I use to describe integration flows that co-exist with massive MOM rollouts. We often get brought in to add value and save a failing SOA.Compatible with centralized ESB This model is not all-or-nothing and it is not expensive. 100% Open Source, if desired.15PPXXCCCAMQP In Action#Producers dont talk directly to queuesExchanges are stateless routersQueues can be bound to one or more exchangesConsumers pull messages off queuesExample of 2 exchanges bound directly to 2 queues16PXCCFan-out ExchangeC#All messages go to all queues that are bound to the fan-out exchange17PXCTopic Exchange121231stock.nasdaq.*stock.#stock.nasdaq.vmwCCstock.nasdaq.vmwstock.nasdaq.cscostock.dow.ge#Pattern matching based routingContent routing rules at the broker level18

Management UIExchange TypesAccess ControlLoad generation

#19

Typical Demo Flow#20

Reliable messaging made simple#Producers get throttled at 40% memory consumption (configurable)Cannot blow up broker by overwhelming it with producers Supports message persistenceQueue/Exchange/Binding persistenceOnce a message hits the broker full ACID properties are guaranteedTransactions can be used to ensure at least once delivery21Reliable Messaging made SimpleLoad Producers get throttled at 40% memory consumption In-memory messages persist to disk under loadPersistenceMessagesExchanges/Queues/BindingsVhosts/users/permissionsTransactionalOnce a message hits the broker full ACID properties are guaranteedTransactions can be used to ensure at least once delivery

#High AvailabilityShared Storage RMQ1X HAProxy, F5, Cisco RMQ2XCPPCC#Load balancingShared StorageSimple but does depend on SAN

23 ESX2 ESX1High AvailabilityvSphereSharedStorage RMQ1X RMQ2XCPPCCvCenter#Simple like previous modelNo need for a load balancerBoth FT (shadow copy VM) and HA (reboot on another host) will work24 PacemakerHigh Availability DRDBCPPCC Corosync, Heartbeat RMQ1X RMQ2XDRDB SyncLocal StorageLocal Storage#Pacemaker provides a single access pointResource manager provides health checkLocal storage is synced using same mechanism as mysql based clusteringBottom Line: Not easy to setup but a proven way to do active/passive.Active/active is also an option and involves a load balancer over multiple brokers (clustered or un-clustered)25CC RMQ2 RMQ1How Clustering WorksPXscottrade.queueXetrade.queue RMQ3Xameritrade.queuePP132scottrade.queueameritrade.queueetrade.queue#26PAMQP Transactionstx-committx-select12C RMQ1X1ACK1221#27Thoughts on XA

No standardization on rollbackHeuristic exceptions will happenDistributed transactions are slow

Use local AMQP transactionsMessaging is about decouplingUse Enterprise Integration Patterns

#28

Groovy CLIMessage PriorityTransactionsClustering

#29Questions?

#30Installation TipsUse Linux or Windows binaries from http://www.rabbitmq.com/server.htmlStick with the version of erlang provided by Linux distributionLocation of config files may vary by distribution (SuSE 11.3 is the demo distro)SSL is not easy to configureInstall the management plugin (It is easy! Copy the following files in you plugins directory)/usr/lib/rabbitmq/lib/rabbitmq_server-2.1.1/pluginshttp://www.rabbitmq.com/releases/plugins/v2.1.1/mochiweb-2.1.1.ezhttp://www.rabbitmq.com/releases/plugins/v2.1.1/webmachine-2.1.1.ezhttp://www.rabbitmq.com/releases/plugins/v2.1.1/amqp_client-2.1.1.ezhttp://www.rabbitmq.com/releases/plugins/v2.1.1/rabbitmq-mochiweb-2.1.1.ezhttp://www.rabbitmq.com/releases/plugins/v2.1.1/rabbitmq-management-2.1.1.ez

#31Clustering TipsMake sure nodes are all the same version /var/lib/.erlang.cookie must be the same for all nodes/etc/rabbitmq/rabbitmq_cluster.config should look like[rabbit@SOMESERVER,rabbit@SOMEOTHERSERVER].Check cluster status via rabbitmqctl statusYou can cluster nodes up manuallyrabbitmqctl stop_apprabbitmqctl resetrabbitmqctl cluster rabbit@SOMESERVERrabbitmqctl start_apprabbitmqctl status#32Developer TipsUse Spring-AMQP if you use Spring today and dont need transactionshttp://www.springsource.org/spring-amqpTransactions are doable in Spring-AMQP but not prettyBe careful when you get a com.rabbitmq.client.AlreadyClosedExceptionCheck the server logs to rule out configuration/initialization issues /var/log/rabbitmq/[email protected] Java client is good for non-spring applications and transactionshttp://www.rabbitmq.com/tutorial-one-java.htmlSpring Integration AMQP support is in a samples git repohttp://git.springsource.org/spring-integration/sandbox.gitAll demo code is available todayhttp://git.springsource.org/~williamsj/spring-samples/asug-spring-samples#33Key Community ResourcesSource Code, Sandboxes, Demoshttp://git.springsource.org/Spring AMQP Forumhttp://forum.springsource.org/forumdisplay.php?f=74Spring Integration Forumhttp://forum.springsource.org/forumdisplay.php?f=42RabbitMQ Mailing Listhttp://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss#34