搜档网
当前位置:搜档网 › 6.5.2 配置Auto-QoS

6.5.2 配置Auto-QoS

6.5.2 配置Auto-QoS
6.5.2 配置Auto-QoS

表6-7所示为入口队列生成Auto-QoS配置.

当在某个端口启用Auto-QoS时,就会自动出现以下行为:

λ

QoS被全部启用(mls qos全局配置命令),并且其他全局配置命令也被加入。

λ

当在端口上输入auto qos voip cisco-phone接口配置命令时,交换机启用可信任的边界特性。交换机使用Cisco发现协议(CDP)来发现一个Cisco IP电话的存在与否。当检测到一个Cisco IP电话时,端口上的入口分类被设置成信赖接收数据包的QoS标签。当没有检测到一个Cisco IP电话时,入口分类不被设置成依赖接收数据包的QoS标签。

λ

当在端口上输入auto qos voip cisco-softphone接口配置命令时(此端口在连接到运行Cisco 软件电话设备的网络边界上),交换机策略数据包,并且指定数据包的行为。

λ

当在端口上输入auto qos voip trust接口配置命令时(此端口连接到网络的内部),交换机信任CoS无路由端口或路由端口的DSCP的值。

2.Auto-QoS注意事项

在配置Auto-QoS时,应当注意以下几个方面的问题:

λ

在CiscoIOS Release 12.2(20)SE及以前版本,Auto-QoS只在Cisco IP电话的交换机端口

上配置VoIP。

λ

在CiscoIOS Release 12.2(20)SE及以后版本,Auto-QoS为在非信任和路由接口上的Cisco IP电话VoIP配置交换机。

λ

10 Gbps接口不支持Auto-QoS,只支持连接Cisco IP电话的端口,或者运行Cisco软件电话特性的端口。

λ

采用Auto-QoS默认值时,在配置其他QoS命令之前应该启用Auto-QoS。如果有必要,可以调节QoS配置,但是,建议只在Auto-QoS配置完成之后再做。

λ

可以在静态、动态访问、语音VLAN访问和中继端口上启用Auto-QoS。

λ

默认情况下,CDP在所有端口上被启用。因为Auto-QoS功能正确,所以不禁用CDP。

λ

当在路由端口的Cisco IP电话上启用Auto-QoS,必须为IP电话指定一个静态IP地址。

λ

只支持Cisco IP Soft Phone Version 1.3(3)或以后的版本。

λ

连接的设备必须使用Cisco Call Manager Version 4或以后的版本。

3.启用Auto-QoS

借助以下操作,可以启用Auto-QoS。

第一步:交换机自动启用QoS,并且配置CoS-to-DSCP映射。

Switch (config) # mls qos

Switch (config) # mls qos map cos-dscp 0 8 16 26 32 46 48 56

第二步:交换机自动映射CoS值至进入口列,并拥有一个极限值ID号。

Switch (config) # no mls qos srr-queue input cos-map

Switch (config) # mls qos srr-queue input cos-map queue 1 threshold 3 0

Switch (config) # mls qos srr-queue input cos-map queue 1 threshold 2 1

Switch (config) # mls qos srr-queue input cos-map queue 2 threshold 1 2

Switch (config) # mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7

Switch (config) # mls qos srr-queue input cos-map queue 2 3 3 5

第三步:交换机自动映射CoS值至出口列,并获得一个极限值ID号。

Switch (config) # no mls qos srr-queue output cos-map

Switch (config) # mls qos srr-queue output cos-map queue 1 threshold 3 5

Switch (config) # mls qos srr-queue output cos-map queue 2 threshold 3 3 6 7

Switch (config) # mls qos srr-queue output cos-map queue 3 threshold 3 2 4

Switch (config) # mls qos srr-queue output cos-map queue 4 threshold 2 1

Switch (config) # mls qos srr-queue output cos-map queue 4 threshold 3 0

第四步:交换机自动映射DSCP值进入口列,并获得一个极限值ID号。

Switch (config) # no mls qos srr-queue input dscp-map

Switch (config) # mls qos srr-queue input dscp-map queue 1 threshold 2 9 10 11 12 13 14 15 Switch (config) # mls qos srr-queue input dscp-map queue 1 threshold 3 0 1 2 3 4 5 6 7

Switch (config) # mls qos srr-queue input dscp-map queue 1 threshold 3 32

Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 2 33 34 35 36 37 38 39 48 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 2 49 50 50 52 53 54 55 56 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 2 57 58 59 60 67 62 63 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47

第五步:交换机自动映射DSCP值至出口列,并获得一个极限值ID号。

Switch (config) # no mls qos srr-queue output dscp-map

Switch (config) # mls qos srr-queue output dscp-map queue 1 threshold 3 40 41 42 43 44 45 46 47 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55 Switch (config) # mls qos srr-queue input dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63 Switch (config) # mls qos srr-queue input dscp-map queue 3 threshold 3 16 17 18 19 20 21 22 23 Switch (config) # mls qos srr-queue input dscp-map queue 3 threshold 3 32 33 34 35 36 37 38 39 Switch (config) # mls qos srr-queue input dscp-map queue 4 threshold 1 8

Switch (config) # mls qos srr-queue input dscp-map queue 4 threshold 2 9 10 11 12 13 14 15 Switch (config) # mls qos srr-queue input dscp-map queue 4 threshold 3 0 1 2 3 4 5 6 7

第六步:交换机自动设置入口队列,利用队列2作为优先队列,队列1处于共享模式。交换机为入口队列配置带宽和缓冲大小。

Switch (config) # no mls qos srr-queue input priority-queue 1

Switch (config) # no mls qos srr-queue input priority-queue 2

Switch (config) # mls qos srr-queue input bandwidth 90 10

Switch (config) # mls qos srr-queue input bandwidth 1 8 16

Switch (config) # mls qos srr-queue input bandwidth 2 34 66

Switch (config) # mls qos srr-queue input bandwidth 67 33

第七步:交换机自动配置出口队列缓冲大小。在映射到端口的出口队列上配置带宽和SRR 模式。

Swtich (config) # mls qos queue-set output 1 threshold 1 138 138 92 138

Swtich (config) # mls qos queue-set output 1 threshold 2 138 138 92 400

Swtich (config) # mls qos queue-set output 1 threshold 3 36 77 100 318

Swtich (config) # mls qos queue-set output 1 threshold 4 20 50 67 400

Swtich (config) # mls qos queue-set output 2 threshold 1 149 149 100 149

Swtich (config) # mls qos queue-set output 2 threshold 2 118 118 100 125

Swtich (config) # mls qos queue-set output 2 threshold 3 41 68 100 272

Swtich (config) # mls qos queue-set output 2 threshold 4 42 72 100 242

Swtich (config) # mls qos queue-set output 1 buffers 10 10 26 54

Swtich (config) # mls qos queue-set output 2 buffers 16 6 17 61

Swtich (config) # srr-queue bandwidth shape 10 0 0 0

Switch (config) # srr-queue bandwidth share 10 10 60 20

第八步:如果要输入auto qos voip trust命令,交换机自动设置入口类别来信任接收

Switch (config-if) # mls qos trust cos

Switch (config-if) # mls qos trust dscp

第九步:如果输入auto qos voip cisco-phone命令,交换机自动启用可信任边界特性,此特性使用CDP来检测一个Cisco IP电话是否存在。

Switch (config-if) # mls qos trust device cisco-phone

第十步:如果输入quto qos voip cisco-softphoone命令,交换机自动创建类别映射和规则映射。Switch (config) # mls qos map policed-dscp 24 26 46 to 0

Switch (config) # class-map match-all AutoQoS-VoIP-RTP-Trust

Switch (config-cmap) # match ip dscp ef

Switch (config) # class-map match-all AutoQoS-VoIP-Control-Trust

Switch (config-cmap) # match ip dscp cs3 af31

Switch (config) # poicy-map AutoQoS-Police-softPhone

Switch (config-pmap) # class AutoQoS-VoIP-RTP-Trust

Switch (config-pmap-c) # set dscp ef

Switch (config-pmap-c) # police 32000 8000 exceed-action policed-dscp-transmit

Switch (config-pmap) # class AutoQoS-VoIP-Control-Trust

Switch (config-pmap-c) # set dscp cs3

Switch (config-pmap-c) # police 32000 8000 exceed-action policed-dscp-transmit

第十一步:创建完类别映射和规则映射,交换机自动应用被称作AutoQoS-Police-SoftPhone 的规则映射到一个入口接口,在接口上带有Cisco软件电话特性的Auto-QoS被启用。Switch (config-if) # service-policy input AutoQoS-Police-SoftPhone

4.为VoIP启用Auto-QoS

在特权EXEC模式下开始,为VoIP启用Auto-QoS。

第一步:进入全局配置命令。

Switch # configure terminal

第二步:指定连接Cisco IP电话的端口。端口是连接运行Cisco软件电话特性的设备,或连接到网络中其他可信任交换机或路由器的端口,并进入接口配置模式。

Switch (config) # interface interface-id

第三步:启用Auto-QoS。

Switch (config) # auto qos voip {cisco-phone| cisco-softphone| trust}

第四步:返回特权EXEC模式。

Switch (config-if) # end

第五步:校验配置。

Switch # show auto qos interface interface-id

显示当Auto-QoS被启用或禁用的自动生成的QoS命令时,在启用Auto-QoS之前输入debug auto qos特权EXEC命令。

若欲在端口上禁用Auto-QoS,可使用no auto qos voip接口配置命令。如果是Auto-QoS 启用的最后一个端口,则输入no auto qos voip命令。

可以使用no mls qos全局配置命令禁用自动-QoS-生成全局配置命令。QoS禁用时,没有信任或非信任端口的概念,因为数据包没有被指定。通信在pass-through模式下被交换。

5.Auto-QoS配置效果

当Auto-QoS被启用时,auto qos voip接口配置命令和生成的配置都被添加到运行配置中。

交换机应用自动-QoS-生成命令就像是在CLI中输入的命令。如果所有的生成命令都成功地应用了,任何的用户配置仍然处在运行配置状态中。如果生成命令应用失败,先前的运行配置就要重新恢复。

若欲显示最初的Auto-QoS配置,可使用show auto qos [interface [interface-id]]特权EXEC 命令。若欲显示任何用户的改变配置,可使用show running-config特权EXEC命令。

显示关于QoS配置的信息,使用下面命令中的其中之一:

show mls qos

show mls maps cos-dscp

show mls qos interface [interface-id] [buffers|queueing]

show mls qos maps [cos-dscp |cos-input-q |cos-output-q | dscp-cos | dscp-input-q | dscp-output-q] show mls qos input-queue

show running-config

6.QoS配置实例

在特权EXEC模式下开始,配置在QoS域边界的交换机,以此确定在其他所有流量之上的VoIP流量的优先权。

第一步:启用Auto-QoS调试。当启用调试时,交换机显示当Auto-QoS启用时的自动生成配置。

Switch (config) # debug auto qos

第二步:进入全局配置模式。

Switch # configure terminal

第三步:启用全局CDP。默认情况下是启用的。

Switch (config) # cdp enable

第四步:指定连接到Cisco IP电话上的交换机端口,并进入接口配置模式。

Switch (config) # interface interface-id

第五步:在端口上调用Auto-QoS,并指定连接到Cisco IP电话上的端口。

Switch (config) # auto qos voip cisoc-phone

第六步:返回全局配置模式。

Switch (config-if) # end

第七步:在尽可能多个连接到Cisco IP电话的端口上重复第4到6步。

第八步:指定作为连接到信任交换机或路由器的交换机端口,并进入接口配置模式。Switch (config) # interface interface-id

第九步:在端口上启用Auto-QoS,并且指定连接到一个可信任路由器或交换机的端口。Switch (config) # auto qos voip trust

第十步:返回特权EXEC模式。

Switch (config-if) # end

第十一步:校验配置。

Switch # show auto qos

第十二步:保存auto qos voip接口配置命令并且在配置文件中生成Auto-QoS配置。Switch # copy running-config startup-config

storm集群的自适应调度算法

Adaptive Online Scheduling in Storm Leonardo Aniello aniello@dis.uniroma1.it Roberto Baldoni baldoni@dis.uniroma1.it Leonardo Querzoni querzoni@dis.uniroma1.it Research Center on Cyber Intelligence and Information Security and Department of Computer,Control,and Management Engineering Antonio Ruberti Sapienza University of Rome ABSTRACT Today we are witnessing a dramatic shift toward a data-driven economy,where the ability to e?ciently and timely analyze huge amounts of data marks the di?erence between industrial success stories and catastrophic failures.In this scenario Storm,an open source distributed realtime com-putation system,represents a disruptive technology that is quickly gaining the favor of big players like Twitter and Groupon.A Storm application is modeled as a topology,i.e. a graph where nodes are operators and edges represent data ?ows among such operators.A key aspect in tuning Storm performance lies in the strategy used to deploy a topology, i.e.how Storm schedules the execution of each topology component on the available computing infrastructure.In this paper we propose two advanced generic schedulers for Storm that provide improved performance for a wide range of application topologies.The?rst scheduler works o?ine by analyzing the topology structure and adapting the de-ployment to it;the second scheduler enhance the previous approach by continuously monitoring system performance and rescheduling the deployment at run-time to improve overall performance.Experimental results show that these algorithms can produce schedules that achieve signi?cantly better performances compared to those produced by Storm’s default scheduler. Categories and Subject Descriptors D.4.7[Organization and Design]:Distributed systems Keywords distributed event processing,CEP,scheduling,Storm 1.INTRODUCTION In the last few years we are witnessing a huge growth in information production.IBM claims that“every day,we create2.5quintillion bytes of data-so much that90%of the data in the world today has been created in the last two Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for pro?t or commercial advantage and that copies bear this notice and the full citation on the?rst page.To copy otherwise,to republish,to post on servers or to redistribute to lists,requires prior speci?c permission and/or a fee. DEBS’13,June29–July3,2013,Arlington,Texas,USA. Copyright2013ACM978-1-4503-1758-0/13/06...$15.00.years alone”[15].Domo,a business intelligence company, has recently reported some?gures[4]that give a perspective on the sheer amount of data that is injected on the internet every minute,and its heterogeneity as well:3125photos are added on Flickr,34722likes are expressed on Facebook, more than100000tweets are done on Twitter,etc.This apparently unrelenting growth is a consequence of several factors including the pervasiveness of social networks,the smartphone market success,the shift toward an“Internet of things”and the consequent widespread deployment of sensor networks.This phenomenon,know with the popular name of Big Data,is expected to bring a strong growth in economy with a direct impact on available job positions;Gartner says that the business behind Big Data will globally create4.4 million IT jobs by2015[1]. Big Data applications are typically characterized by the three V s:large volumes(up to petabytes)at a high veloc-ity(intense data streams that must be analyzed in quasi real-time)with extreme variety(mix of structured and un-structured data).Classic data mining and analysis solutions quickly showed their limits when faced with such loads.Big Data applications,therefore,imposed a paradigm shift in the area of data management that brought us several novel approaches to the problem represented mostly by NoSQL databases,batch data analysis tools based on Map-Reduce, and complex event processing engines.This latter approach focussed on representing data as a real-time?ow of events proved to be particularly advantageous for all those appli-cations where data is continuously produced and must be analyzed on the?https://www.sodocs.net/doc/3d17601924.html,plex event processing engines are used to apply complex detection and aggregation rules on intense data streams and output,as a result,new events.A crucial performance index in this case is represented by the average time needed for an event to be fully analyzed,as this represents a good?gure of how much the application is quick to react to incoming events. Storm[2]is a complex event processing engine that,thanks to its distributed architecture,is able to perform analytics on high throughput data streams.Thanks to these character-istics,Storm is rapidly conquering reputation among large companies like Twitter,Groupon or The Weather Chan-nel.A Storm cluster can run topologies(Storm’s jargon for an application)made up of several processing components. Components of a topology can be either spouts,that act as event producers,or bolts that implement the processing logic.Events emitted by a spout constitute a stream that can be transformed by passing through one or multiple bolts where its events are processed.Therefore,a topology repre-

19252-storm入门到精通-storm1

Storm简介

Storm简介 ?实时计算需要解决一些什么问题?实现一个实时计算系统?Storm基本概念 ?Storm使用场景 ?Storm分组机制

Storm简介 ?实时计算需要解决一些什么问题 伴随着信息科技日新月异的发展,信息呈现出爆发式的膨胀,人们获取信息的途径也更加多样、更加便捷,同时对于信息的时效性要求也越来越高。举个搜索场景中的例子,当一个卖家发布了一条宝贝信息时,他希望的当然是这个宝贝马上就可以被卖家搜索出来、点击、购买啦,相反,如果这个宝贝要等到第二天或者更久才可以被搜出来,估计这个大哥就要骂娘了。再举一个推荐的例子,如果用户昨天在淘宝上买了一双袜子,今天想买一副泳镜去游泳,但是却发现系统在不遗余力地给他推荐袜子、鞋子,根本对他今天寻找泳镜的行为视而不见,估计这哥们心里就会想推荐你妹呀。其实稍微了解点背景知识的码农们都知道,这是因为后台系统做的是每天一次的全量处理,而且大多是在夜深人静之时做的,那么你今天白天做的事情当然要明天才能反映出来啦。

Storm简介 ?实现一个实时计算系统 全量数据处理使用的大多是鼎鼎大名的hadoop或者hive,作为一个批处理系统,hadoop 以其吞吐量大、自动容错等优点,在海量数据处理上得到了广泛的使用。但是,hadoop不擅长实时计算,因为它天然就是为批处理而生的,这也是业界一致的共识。否则最近这两年也不会有 s4,storm,puma这些实时计算系统如雨后春笋般冒出来啦。先抛开s4,storm,puma这些系统不谈,我们首先来看一下,如果让我们自己设计一个实时计算系统,我们要解决哪些问题。

论Storm分布式实时计算工具

龙源期刊网 https://www.sodocs.net/doc/3d17601924.html, 论Storm分布式实时计算工具 作者:沈超邓彩凤 来源:《中国科技纵横》2014年第03期 【摘要】互联网的应用催生了一大批新的数据处理技术,storm分布式实时处理工具以其强大的数据处理能力、可靠性高、扩展性好等特点,在近几年得到越来越广泛的关注和应用。 【关键词】分布式实时计算流处理 1 背景及特点 互联网的应用正在越来越深入的改变人们的生活,互联网技术也在不断发展,尤其是大数据处理技术,过去的十年是大数据处理技术变革的十年,MapReduce,Hadoop以及一些相关 的技术使得我们能处理的数据量比以前要大得多得多。但是这些数据处理技术都不是实时的系统,或者说,它们设计的目的也不是为了实时计算。没有什么办法可以简单地把hadoop变成一个实时计算系统。实时数据处理系统和批量数据处理系统在需求上有着本质的差别。 然而大规模的实时数据处理已经越来越成为一种业务需求了,而缺少一个“实时版本的hadoop”已经成为数据处理整个生态系统的一个巨大缺失。而storm的出现填补了这个缺失。Storm出现之前,互联网技术人员可能需要自己手动维护一个由消息队列和消息处理者所组成的实时处理网络,消息处理者从消息队列取出一个消息进行处理,更新数据库,发送消息给其它队列等等。不幸的是,这种方式有以下几个缺陷: 单调乏味:技术人员花费了绝大部分开发时间去配置把消息发送到哪里,部署消息处理者,部署中间消息节点—设计者的大部分时间花在设计,配置这个数据处理框架上,而真正关心的消息处理逻辑在代码里面占的比例很少。 脆弱:不够健壮,设计者要自己写代码保证所有的消息处理者和消息队列正常运行。 伸缩性差:当一个消息处理者的消息量达到阀值,需要对这些数据进行分流,配置这些新的处理者以让他们处理分流的消息。 Storm定义了一批实时计算的原语。如同hadoop大大简化了并行批量数据处理,storm的这些原语大大简化了并行实时数据处理。storm的一些关键特性如下: 适用场景广泛:storm可以用来处理消息和更新数据库(消息流处理),对一个数据量进行持续的查询并返回客户端(持续计算),对一个耗资源的查询作实时并行化的处理(分布式方法调用),storm的这些基础原语可以满足大量的场景。

storm

Storm是Twitter所提出的一个分布式计算系统,最初的目的是为了能将Twitter上一些最新的动态实时推送给用户,但随着它的发展,Twitter的工程师逐渐把Storm进行高层抽象,最终形成这么一个实时计算框架。Storm内部逻辑并不复杂,而且使用起来非常简单,这使得它能更容易的被其他开发者应用到他们自己的产品中去,开发人员可以利用Storm完成一些或简单或复杂的实时计算。而Storm作为这么一个分布式计算框架,它最耀眼的一个特点就是它的容错机制,它可以保证所发送出来的数据都不会丢失,达到记录级的容错,并且在速度上非常优秀,能进行实时计算。。 2.3.1 Storm Storm具有以下优点: 1.简单的编程模型。Storm提供spout和bolt原语,降低了进行海量数 据实时处理的复杂度。 2.服务化。提供计算模型的抽象,作为一个计算框架,支持热部署, 即时提交或下线Topology。 3.支持多种编程语言。默认支持Clojure、java、Ruby和Python等语言, 但也通过实现一个Storm通信协议就可以增加对其他语言的支持, 语言扩展性好。 4.容错性。Fail-fast系统,通过Zookeeper进行任务协作,nimbus和 supervisor集群不保存任务状态,重启机器结点也不影响。 5.水平扩展。数据处理在线程、进程和机器节间都可以并行。 6.高可靠性的消息处理。Storm保证不会丢失数据,每次所发送出去的 消息都会被处理。如果某个消息的处理超过响应时间,则会从源头 重新发送该消息。 7.快速。因为Storm在底层所使用的数据传输方式是ZeroMQ,其被誉 为是最高性能的消息队列,而且它流式模型设计也保证了任何消息 都能实时响应。 Storm当前存在的问题: 1.目前Storm中nimbus机器只有一个,这就导致如果宕机,则新的Topology 无法提交,这样的话只能靠人工进行重启,不能实现自动化。 2.Storm虽然支持多语言开发,但其核心部分内容是由Clojure语言编写, 虽然它的性能很高,并且具有流程计算的优势,但也使得维护成本增加。 2.3.2 Storm架构 Storm集群主要由两类节点组成,master和worker,它们一般都是一对多

基于Storm的实时大数据处理

基于Storm的实时大数据处理 摘要:随着互联网的发展,需求也在不断地改变,基于互联网的营销业务生命周期越来越短,业务发展变化越来越快,许多业务数据量以指数级增长等等都要求对大量的数据做实时处理,并要求保证数据准确可靠。面对这些挑战云计算、大数据概念应运而生,Hadoop、Storm等技术如雨后春笋般出现。本文就当今最火的实时流数据处理系统Storm进行详细介绍。在介绍Storm之前首先详细介绍了实时计算和分布式系统相关技术概念以便为后面内容做铺垫。通过对Storm的基本概念、核心理念、运行机制和编程场景进行了全面的探讨,使得我们对Storm有了一个比较全面的理解和方便我们在这方面进行更进一步的学习。 关键字:Storm;实时大数据;流数据处理 1概要 当今世界,信息爆炸的时代,互联网上的数据正以指数级别的速度增长。新浪微博注册用户已经超过3亿,用户日平均在线时长60min,平均每天发布超过1亿条微博[1]。在这种背景下,云计算的概念被正式提出,立即引起了学术界和产业界的广泛关注和参与。Google 是云计算最早的倡导者,随后各类大型软件公司都争先在“云计算”领域进行一系列的研究和部署工作。目前最流行的莫过于Apache的开源项目Hadoop分布式计算平台,Hadoop专注于大规模数据存储和处理。这种模型对以往的许多情形虽已足够,如系统日志分析、网页索引建立(它们往往都是把过去一段时间的数据进行集中处理),但是在实时大数据方面,Hadoop的MapReduce却显得力不从心,业务场景中需要低延迟的响应,希望在秒级别或者毫秒级别完成分析,得到响应,并希望能够随着数据量的增大而扩展。此时,Twitter公司推出开源分布式、容错的实时流计算系统Storm,它的出现使得大规模数据实时处理成为可能,填补了该领域的空白。 Storm是一个类似于Hadoop可以处理大量数据流的分布式实时计算系统。但是二者存在很大的区,其最主要的区别在于Storm的数据一直在内存中流转,Hadoop使用磁盘作为交换介质,需要读写磁盘。在应用领域方面,Storm是基于流的实时处理,Hadoop是基于任务调度的批量处理。另一个方面,Hadoop基于HDFS需要切分输入数据、产生中间数据文件、排序、数据压缩、多份复制等,效率比较低,而Storm基于ZeroMQ这个高性能消息通讯库,不持久化数据[2]。 2实时计算介绍 实时计算(Real-time computing)也称为即时计算,是计算机科学中对受到“实时约束”的计算机硬件和计算机软件系统的研究,实时约束是从事件发生到系统回应之间的最长时间限制。实时程序必须保证在严格的时间限制内响应。 互联网领域的实时计算一般都是针对海量数据进行的,实时计算最重要的一个需求是能够实时响应计算结果,一般要求为秒级。互联网行业的实时计算可以分为以下两种应用场景:(1)持续计算:主要用于互联网流式数据处理。所谓流式数据是指将数据看作是数据流的形式来处理。数据流是一系列数据记录的集合体。常见的数据流如网站的访问PV/UV、点击、搜索关键字。 (2)实时分析:主要用于特定场合下的数据分析处理。当数据量很大,且存在无穷的查询条件组合,或穷举并提前计算和保存结果的代价很大时,实时计算就可以发挥作用,将部分计算或全部计算过程推迟到查询阶段进行,但要求能够实时响应。 实时计算需要解决的问题和难点是实时存储和实时计算。实时存储可以通过使用高性能

相关主题