dubbo教程高级篇第20节消息中间件在分布式系统的作用介绍mq对比来源于_第1页
dubbo教程高级篇第20节消息中间件在分布式系统的作用介绍mq对比来源于_第2页
dubbo教程高级篇第20节消息中间件在分布式系统的作用介绍mq对比来源于_第3页
dubbo教程高级篇第20节消息中间件在分布式系统的作用介绍mq对比来源于_第4页
dubbo教程高级篇第20节消息中间件在分布式系统的作用介绍mq对比来源于_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

、MQ、主要关注前三个(标红高高中中中中低低中高高中中中低高低低多多中多中中少少中由于ErlangLinux高43方式CJMSPerl、.net等C+(不成python、java、php、.net等库负载好有console实现无好无优点户端;缺点且对5.xActivemq不 erlang持amqpamqp的客优点用(JMS的50台左右,broker中;缺点mq中 等接的API下层MQ有多个mqnotify面mq这支持的ProtocolsThefollowingtableliststhesupportedprotocolsofeach0-8,0------------------STOMP-------InterfacesC------------Java--Java------------------------mq ark[文献MQrabbitmqkafka传统MQScenarioA:Enqueuing20,000messagesof1024byteseach,thendequeuingthemScenarioB:Enqueuinganddequeuingsimultaneously20,000messagesof1024byteseach.ScenarioC:Enqueuinganddequeuingsimultaneously200,000messagesof32bytesScenarioD:Enqueuinganddequeuingsimultaneously200messagesof32768bytesScenarioScenarioScenarioScenarioKafkavskafkarabbitmq的对比中,kafka工作是保证消息consumer是一直处于alive状态去消费消息的;broker重,需要记录很多状充分考虑消息堆积因consumer不alive状态;考虑各个角色的分布式;为追求吞吐量设broker设计较轻,不保存consumer的消提供了丰富的的exchange、bindingqueuing等modelqueue、topic等routing都topicroutingtopicrouting对应用透明的集群式但是集群对producer并不是完全透明,producer需要确认消同这一点实现了消息的顺序递交特性(partition内的消息是顺序的mirrorqueue来masterslave通过replica来支持 master/slave的可以自动切换(当master支持,但需要人工切换masterslave消息量消息量消息量。mqmetaq,metaqlinkedinkafka(scala)java版本,并对其增加了事务的支持mqmetaq3.0kafka,其擅以替代传统大部分MQ。。notify,meta2.x以前的所有队列由于mq还比较新且没有给出相应的benark而mq社区主要活跃者均国内人员,因此不便于直接对比mq和其他队列。在这里用kafka和其他队列进行对比,mq的性能比kafka还要好一些。kafkavsrabbitmqinKafkaisageneralpurposemessagebroker,likeRabbItMQ,withsimilardistributeddeploymentgoals,butwithverydifferentassumptionsonmessagemodelsemantics.Iwouldbeskepticalofthe"AMQPismoremature"argumentandlookatthefactsofhoweithersolutionsolvesyourproblem.UseKafkaifyouhaveafirehoseofevents(100k+/sec)youneeddeliveredinpartitionedorder'atleastonce'withamixofonlineandbatchconsumers,youwanttobeabletore-readmessages,youcandealwithcurrentlimitationsaroundnode-levelHA(orcanusetrunkcode),and/oryoudon'tmindsupportingincubator-levelsoftwareyourselfviaforums/IRC.UseRabbitifyouhavemessages(20k+/sec)thatneedtoberoutedincomplexwaystoconsumers,youwantper-messagedeliveryguarantees,youdon'tcareaboutordereddelivery,youneedHAatthecluster-nodelevelnow,and/oryouneed24x7paidsupportinadditiontoNeitheroffersgreat"filter/query"capabilities-ifyouneedthat,considerusingStormontopofoneofthesesolutionstoaddcomputation,filtering,querying,onyourstreams.OrusesomethinglikeCassandraasyourqueryablecache.Kafkaisalsodefiniynot"mature"eventhoughitis"productionready".Details(caveat-myopinion,I'venotusedeitheringreatanger,andIhavemoreexposuretoFirstly,onRabbitMQvs.Kafka.Theyarebothexcellentsolutions,RabbitMQbeingmoremature,butbothhaveverydifferentdesignphilosophies.Fundamentally,I'dsayRabbitMQisbroker-centric,focusedarounddeliveryguaranteesbetweenproducersandconsumers,withtransientpreferredoverdurablemessages. WhereasKafkaisproducer-centric,basedaroundpartitioningafirehoseofeventdataintodurablemessagebrokerswithcursors,supportingbatchconsumersthatmaybeoffline,oronlineconsumersthatwantmessagesatlowlatency.RabbitMQusesthebrokeritselftomaintainstateofwhat'sconsumed(viaacknowledgements)-itusesErlang'sMnesiatomaintaindeliverystatearoundthebrokercluster.Kafkadoesn'thavemessageacknowledgements,itassumestheconsumertracksofwhat'sbeenconsumedsofar.BothKafkabrokers&consumersuseZookeepertoreliablymaintaintheirstateacrossacluster.RabbitMQpresumesthatconsumersaremostlyonline,andanymessages"inwait"(persistentornot)areheldopaquely(i.e.nocursor).RabbitMQpre-2.0(2010)wouldfalloverifyourconsumersweretooslow,butnowit'srobustforonlineandbatchconsumers-butclearlylargeamountsofpersistentmessagessittinginthebrokerwasnotthemaindesigncaseforAMQPingeneral.Kafkawasbasedfromthebeginningaroundbothonlineandbatchconsumers,andalsohasproducermessagebatching-it'sdesignedforholdinganddistributinglargevolumesofRabbitMQprovidesrichroutingcapabilitieswithAMQP0.9.1'sexchange,bindingandqueuingmodel.Kafkahasaverysimpleroutingapproach-inAMQPparlanceitusestopicexchangesBothsolutionsrunasdistributedclusters,butRabbitMQ'sphilosophyistomaketheclustertransparent,asifitwereavirtualbroker.Kafkamakesitexplicit,byforcingtheproducertoknowitispartitioningatopic'smessagesacrossseveralnodes,thishasthebenefitofpreservingordereddeliverywithinapartition,whichisricherthanwhatRabbitMQexposes,whichisalmostalwaysunordereddelivery(theAMQP0.9.1modelsays"oneproducerchannel,oneexchange,onequeue,oneconsumerchannel"isrequiredforin-orderdelivery).Putanotherway,Kafkapresumesthatproducersgenerateamassivestreamofeventsontheirowntimetable-there'snoroomforthrottlingproducersbecauseconsumersareslow,sincethedataistoomassive.ThewholejobofKafkaistoprovidethe"shockabsorber"betweenthefloodofeventsandthosewhowanttoconsumethemintheirownway--someonline,othersoffline-onlybatchconsumingonanhourlyorevendailybasis.Kafkacandeliver"atleastonce"semanticsperpartition(sincemaintainsdeliveryorder),justlikeRabbitMQ,butitdoesitinaverydifferentway.Performance-wise,ifyourequireordereddurablemessagedelivery,currentlyitlookslikethere'snocomparison:KafkacurrentlyblowsawayRabbitMQintermsofperformanceonsyntheticbenarks.Thispaperindicates500,000messagespublishedpersecondand22,000messagesconsumedpersecondona2-nodeclusterwith6-diskRAID/en...OfcoursethiswaswrittenbytheLinkedInguyswithoutnecessarilyexpertRabbitMQinput,soFinally,a KafkaisanearlyApacheincubator Itdoesn'tnecessarilyhavethehard-learnedaspectsinNow,awordonAMQP.Frankly,itseemsthestandardisamess.Officiallythereisa1.0proposedspecificationthatisgoingthroughtheOASISstandardsprocess.InpracticeitisaAsetofgenerallyavailable,widely-adopted,production-qualityAMQP1.0implementationsacrossthemajorreleases(QpidfromRedhat,RabbitMQ,etc.)won'texistuntil2013,ifever.Asanexternalobserverwithnoinsideknowledge,hereiswhatitlookslike:theworkinggroupspent5yearsonaspec,from2003to2008,culminatinginawidelyadoptedrelease(0.9.1).Thenasubsetofmorepowerfulworkinggroupmembersrewrotethespecbylate2011,compleyshiftingthefocusofthespecfromamessagingmodeltoatransportprotocol(sortoflikeTCP++),anddeclaredit1.0.So,wehavethestrangecasewherethe"mature"AMQPisthenon-standard0.9.1specificationandthe"immature"AMQPistheactual1.0standard.Thisisn'ttosuggest1.0isn'tgoodtechnology,itlikelyis,butthatit'samuchlower-levelspecthanAMQPintendedtobeformostofitspublishedlife,andisnotwidelysupportedyetbeyondprototypesando

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论