Cognos联机文档片段摘读:分布式部署

 

文档来源【inst_cr_winux】

关于Cognos 8.3的分布式及集群负载调度策略(由于不同版本的Cognos调度策略略有不同,故标明版本)

To improve performance or to enhance security, you can install any one of the following components
on a separate computer:
● gateway
● Application Tier Components
● Content Manager
● Cognos Content Database

Cognos组件可拆为上述四个部分部署,其中Cognos Content Database为支持的数据库及初始化在数据库中的数据库对象,如表、视图等。以上四个部分可以部署在同一机器上,也可以部署在不同机器上。

If you install Cognos 8 components on more than one computer, you must configure environment properties so that the distributed components can communicate with each other:
● The Content Manager computers must know the location of the content store, the other Content
Manager computers, and the database that is used for notification.
● The gateway computer must know the location of at least one dispatcher.
The dispatcher should be located on a report server computer.
● The Application Tier Components computer must know the location of the Content Manager
computers and the database to use for job and schedule information.

如果要分布式部署,那么要求:

CM服务必须配置content store,即数据库的信息,此处需要注意的是Cognos CM模块使用JDBC连接content store,具体使用的驱动程序版本查看联机文档。

最后,在分布式部署环境下,特别是Application Tier的配置有时候会不认识IP地址的配置方式,可能由于Application Tier是从CM中获取分布在其它机器上的Application Tier应用,而Application Tier在注册自己到CM中时会使用计算机名,因此,建议在分布式部署中统一在hosts文件中配置主机名,并在Application Tier及CM中配置这些主机名信息,而非IP地址。

You must also configure cryptographic properties to ensure that each computer uses the same settings.

分布式环境下的各部署组件都应该使用相同的加密方式,因为服务之间的通讯是加密的,但是这些加密文件是有过期日的,在早期版本没有自动更新密钥的功能,在新的版本中是否有自动更新密钥的功能尚不可知。加密方式通常使用默认方式,因此不用修改就是满足该要求的地方。

In a distributed environment, the sequence in which you configure computers is important. You must configure and then start the services on at least one computer where you installed Content Manager before you configure other computers in your Cognos environment. You must configure the gateway computer last so that cryptographic keys are shared and secure communication can take place among the three components. The server specified for the External Dispatcher URI property on the gateway computer must be the last server that you start.

分布式部署,各组件的配置顺序很重要,必须最先配置并启动CM服务,因为Application Tier需要从CM服务中获取密钥等信息。gateway需要在Application Tier配置并启动后才能配置,同样因为gateway也需要通过Application Tier获取通讯密钥。

Your installation may include more than one Content Manager, each on a different computer. One Content Manager computer is active and one or more Content Manager computers are on standby.The standby Content Manager computers are for failover protection. If the active Content Manager computer is not available because of a software or hardware failure, a standby Content Manager computer becomes active and requests are directed to it.

CM通常部署多个,并分布在不同机器上,多个CM只有一个是active状态,对外提供服务,其余为standby状态,用作failover,当由于active CM由于软硬件故障不可用时,会转移到其它可用的CM服务上,即另外一个处于standby状态下的CM变成active状态。设计于此,但是目前仍存在active CM自己内部出现问题而不能被其它处于standby CM检测到,而导致整个系统瘫痪的情况,该故障可能和JVM内存溢出有关,通常运行一两周后会出现该问题,该问题通过变更Cognos 内嵌的tomcat容器为weblogic等企业级容器得到改善,有待验证。

When the active Content Manager fails, unsaved session data is lost. When another Content Managerbecomes active, users may be prompted to log on.

active CM的切换会导致所有在线用户失效,需要重新登录。默认先启动的CM 为active状态,也可以在Cognos administration中配置,指定特定的CM为活动状态。

To support failover protection, you must synchronize the system clocks on the Content Managercomputers. If you use the default CGI gateway, you must also configure Cognos 8 to use an ISAPIgateway instead.

如果要实现failover,必须同步CM服务器的系统时钟,并且必须使用ISAPI(windwos下)而不是默认的CGI;CGI的切换导致用户session失效,对failover要求不是很高的情况下,使用CGI也会带来其它好处,如一个CGI的崩溃不会导致web server的崩溃,而ISAPI却可能会出现这种情况。

另外,Cognos 内嵌了derby数据库可以作为默认的content database,虽说是小型数据库,好像占用资源却不少,如果你熟悉Oracle的话,建议安装xe。

If you installed more than one Content Manager,you must list all Content Manager URIs on each Content Manager computer.

如果多个CM,必须在每个CM机器上列出所有的CM URIs!此处CM之间的互联可能是通过配置中Content Manager URIs项的主机名称连接,因此使用IP地址可能导致问题!!

If you change global settings on one Content Manager computer, you must make thesame changes on the other Content Manager computers.

所有CM 上的global settings(全局配置)必须保持一致。

We recommend that you use the computer with the highest processor speed for the default active Content Manager.

建议使用CPU速度较高的设备安装 CM。

Do not delete the first value in the table. This value identifies the local Content Manager computer and is required.

不要删除CM 配置中URIs列表中的第一个URIs,这个是本地CM 服务,是必须的配置项。有多个CM的情况下,这个列表的顺序是否要在所有CM上保持一致?还是每个都是将自己放在第一?由于只有在active CM 切换时才使用该URIs列表,因此该列表的顺序并不会影响正常状态下的运行,因此本人在配置时使用了所有CM 采用相同顺序配置。

In the Properties window, under CSK settings, set Store symmetric key locally to True.

加密文件CSK的存放位置为locally(本地文件系统),这个是默认的配置。

Ensure that the values for all of the properties match what you configured on the default active Content Manager computer.

对于standby的CM,所有配置必须和active的CM保持一致。

If you installed more than one Content Manager, you must list all Content Manager URIs on each report server computer.

对于分布式部署的多个Application Tier的配置中,必须指定所有的CM URIs。

If Content Manager and the Application Tier Components are installed on separate computers, on the Application Tier Components computer, you must do the following:
❑ Specify a mail server account and notification database.

如果Application Tier 没有和CM部署在同一台机器上,则需要配置mail server account 和notification database。

The distributed components can then communicate with each other.

分布式部署的Cognos组件,各组成部分之间必须能够互相通讯(TCP/IP),不同服务使用不同端口,其中gateway到dispatch默认使用9300端口,Application Tier到CM默认也使用9300端口,Application Tier多个服务之间的通讯有多个端口。如果Application Tier要使用CM的日志服务,除9300端口外,还要保证CM日志服务所用到的端口是畅通的。

In the Properties window, specify the appropriate value for the Gateway URI, by changing the localhost portion to the name of the gateway computer.

Application Tier 配置中的Gateway URI配置指向URI,如果未配置也未发现异常,此处配置何用?

A dispatcher is installed on every Content Manager and Application Tier Components computer. We recommend that the gateway use the dispatcher on a Application Tier Components computer.

gateway中配置的dispatcher可以是CM服务的dispatcher或者是Application Tier 的dispatcher,因为Application Tier 和CM服务都必须有自己的dispatcher,但是建议使用Application Tier 的dispatcher。

在正确配置的集群中,dispatcher的负载均衡可能失效,导致dispatcher接收的请求不能转发给其它服务,只能在本地处理,遇到这种情况可能是注册在资料库中的服务信息异常,可以尝试在Cognos Administration中刷新服务。

For failover protection, you can configure more than one dispatcher for a gateway computer. When multiple dispatchers are configured, requests are normally routed to the first dispatcher in the list. If this dispatcher becomes unavailable, the gateway determines the next functioning dispatcher on the list and routes requests there. The primary dispatcher status is monitored by the gateway, and requests are routed back to this component when it returns to service

为了实现failover,需要在gateway中配置多个dispatcher的URIs,但是正常情况下,gateway只将请求转发给dispatcher列表中的第一个dispatcher,只有当第一个不可用的情况下才转发给列表中的其它可用的dispatcher。gateway会监视第一个dispatcher的状态,一旦第一个可用,则仍转发给第一个dispatcher。

Cognos gateway的这种web层转发策略很是让人匪夷所思,因为采用轮询的方式几乎是所有类似插件的做法,而且实践证明轮询是最好的方式,而Cognos gateway却仅将请求转发给列表中的第一个dispatcher。这样会带来一个问题,就是一个gateway只能转发到一个dispatcher,如果仅有一个gateway,那么只能使用单一个dispatcher服务,dispatcher可能造成整个系统的瓶颈,那么至少要采用多个gateway,通过dispatcher URIs的不同顺序来解决单个dispatcher瓶颈的问题。

Cognos gateway的调度策略很简单,对于负载均衡方面,更多的需要依靠dispatcher的转发策略,但本文仍未深入介绍dispatcher的调度策略。也可以考虑使用软件路由或者硬件路由的方式代替gateway直连dispatcher,如apache的反向代理或者F5等网络负载均衡器。

If you installed all components on several computers, you can disable appropriate services on each
computer to get the distributed configuration you require. Requests are sent only to dispatchers
where a given service is enabled.
Disabling a service prevents the service from loading into memory. When disabled, services do not
start and therefore do not consume resources. The service does not run until you enable it.
If you disable the dispatcher service, all services that run under that dispatcher are also disabled.
Only dispatcher services that are enabled can process requests.

在集群环境中部署了多个服务器,每个可以根据需要设定每个服务器上提供的服务类型,但是dispatcher服务是必须启动的,否则该机器上的所有Cognos服务都无法使用,因为其它服务是从属于dispatcher服务的。

A local log server is automatically installed when you install Content Manager or the Application
Tier Components. You can specify one or more destinations where the local log server sends log
messages

在安装CM或者Application Tier 的服务器上会自动安装本地日志服务,可以指定本地日志记录在多个位置;

此处未说明如果其中一个不可用会出现什么后果。

If the remote log server becomes unavailable, log messages are redirected to recovery files on the
local computer in the c8_location\logs\recovery\remote directory.

如果remote log server 不可用,日志信息将重定向到本地计算机上。

因此,remote log server 不可用不会导致灾难性后果。

These recovery files have timestamp information in their file names, and are not readable like regular log files. When the remote log server becomes available, an automatic recovery process moves all log information to the remote log server and deletes the local log files.

由于远程日志服务不可用而记录在本地的日志文件不具备可读性,一旦远程日志服务恢复,那么这些临时存储在本地的远程日志信息将重新写入远程日志服务。

该方式有效的规避了远程日志服务可靠性低的问题。如果远程日志服务被定义,那么如果仍然配置了数据库的日志,远程日志服务器和本地数据库服务器未重复记录审计日志,可能的策略是配置了Remote Log server以后,则本地的数据库日志将不起作用。

If this folder does not exist, Cognos 8 does not create the cognos.log file and no log messages can be recorded in it. Note that these log messages are not recorded in the default log file. Although Cognos 8 automatically creates the default log file even when another log file is configured, the default log file is not used as a backup.

如果重定向日志文件所在的目录不存在,那么日志信息将不会被记录,注意,日志不会被记录在默认的日志文件中,即便系统自动生成了默认的日志文件。

The log server can also send audit logs to a database on the same or another computer. Audit logs provide information about user and report activity.

数据库日志仅记录与用户和报表执行相关的审计信息。

即数据库日志并非记录了所有的日志信息。

If you want to use TCP between Cognos 8 components on a computer and its local log server, set the Enable TCP property to True. The default setting, UDP, provides faster communication with a lower risk of lost connections than TCP. However, the risk of losing a local TCP connection is low. TCP is always used for communication between a local log server and a remote log server.

本地服务和本地日志服务之间的的通讯默认使用UDP,如果要提升可靠性也可以设置成TCP,不过会降低性能;本地服务和远程日志服务通讯总是使用TCP协议。

You can set a value between 1 and 20. The default value of 10 is recommended. However,if you have a high number of log messages, you may want to allocate more threads to improve performance

日志服务的线程数可以配置1~20个,默认的10个,如果日志较多的话可以适当增加日志服务的线程数。

如果发现日志丢失现象,不妨增加一些日志服务的线程数,因为日志的处理方式一般是无法写入则抛弃。

If you want UTF-8 encoding applied to log messages written to a file, set the Use UTF8 property to True.

如果要记录带多国字符集,请使用UTF-8格式,查看日志的时候也需要支持UTF-8的查看工具。

Cognos 8 installs and uses Tomcat as the application server by default. You can choose to run Cognos 8 within one of the following supported third-party application servers instead:
● BEA WebLogic Server
● IBM WebSphere Application Server
● Oracle Application Server
● Red Hat JBoss
● SAP Web Application Server

除了默认的Tomcat,Cognos还支持上述5中J2EE容器。

Cognos部署在早期版本的weblogic上曾遇到不稳定的情况,因此使用上述容器前建议做技术验证后实施。

An added feature is that you can take a snapshot of the current system metrics so that you can track trends over time or review details about the state of the system at a particular time. For more information, see the topic about the metric dump file in the troubleshooting chapter of the Administration and Security Guide.

Administration and Security Guide,这个文档中记录了如何查看过去监控信息的快照,对性能分析很有帮助。


● The Presentation service must remain enabled on at least one computer in your Cognos 8
environment.

集群中至少需要保留一个表示服务。dispatcher仅发送报表请求给有开启Presentation service ,如果一个服务器已经开启了Presentation service ,则该服务器必须开启Report Services,否则当dispatcher指定该服务器处理报表请求时将会出现错误。如仅安装了CM的服务器上无Report Services,则默认Presentation service 也是关闭的,如果开启则会出现访问错误。
● If you want to use Query Studio, you must enable the Presentation service.

提供Query Studio访问的机器中必须保留表示服务。
● If you want to use Analysis Studio, you must enable the Report service.

提供Analysis Studio访问的机器必须保留报表服务。
● If some Cognos 8 components are not installed on a computer, you should disable the services
associated with the missing components. Otherwise the Cognos 8 components will randomly fail.

如果组件没有安装,应该关闭相关服务功能,否则会导致不定期错误。

After you install and configure Cognos 8, one dispatcher is available on each computer by default.
Each dispatcher has a set of associated services, listed in the following table.

Cognos安装后,默认所有的机器上都有dispatcher服务,每个dispatcher服务有一套相关的服务,如下表:

服务名称功能备注
Agent service

Runs agents. If the conditions for an agent are met when the agent runs, the agent service asks the monitor service to run the tasks.

Batch report service

Manages background requests to run reports and
provides output on behalf of the monitor service

Content Manager service

● Performs object manipulation functions in the content store, such as add, query, update, delete, move, and copy
● Performs content store management functions, such as import and export

Data movement service

Manages the execution of data movement tasks in Cognos 8. Data movement tasks, such as Builds and JobStreams, are created in Data Manager Designer and published to Cognos 8.

Delivery service

Sends emails to an external SMTP server on behalf of other services, such as the report service, job service, agent service, or data integration service

发送邮件
Event management service

Creates, schedules, and manages event objects that represent reports, jobs, agents, content store maintenance, deployment imports and exports, and metrics

Job service

Runs jobs by signaling the monitor service to run job steps in the background. Steps include reports, other jobs, import, exports, and so on.

Log service

Records log messages generated by the dispatcher and
other services. The log service can be configured to
record log information in a file, a database, a remote
log server, Windows Event Viewer, or a UNIX system
log. The log information can then be analyzed by
customers or by Cognos Customer Support, including:
Log service
● security events
● system and application error information
● selected diagnostic information

Metric Studio service

Provides the Metric Studio user interface for monitoring
and entering performance information

Migration service

Manages the migration from Cognos Series 7 to
Cognos 8.

用于集成Cognos 7
Monitor service

Manages the monitoring and execution of tasks that are scheduled, submitted for execution at a later time, or run as a background task
● Assigns a target service to handle a scheduled task. For example, the monitor service may ask the batch report service to run a report, the job service to run a job, or the agent service to run an agent.
● Creates history objects within the content manager
and manages failover and recovery for executing
entries

Presentation service

Transforms generic XML responses from another service into output format, such as HTML or PDF Provides display, navigation, and administration capabilities in Cognos Connection

生成报表样式,界面交互
Report data service

Manages the transfer of report data between Cognos 8 and applications that consume the data, such as Cognos 8 Go! Office and Cognos 8 Go! Mobile.

为Cognos其它产品提供数据服务
Report service

Manages interactive requests to run reports and provides output for a user in Cognos Connection or a studio

报表服务,是高耗能的服务
System service

Defines the Business Intelligence Bus API-compliant service used to obtain application-wide Cognos 8 configuration parameters. It also provides methods that normalize and validate locale strings and map locale strings to locales supported by your application

管理BIBUS,业务处理都与之相关

Cognos服务的功能列表,出列CM外,其它都叫Application Tier,即应用层服务,CM服务和应用层服务的拆分是安装向导提供的,而其它服务层组件则安装在一起,但可以根据关闭,这样可以提升性能。

无论文档说多少,只要说了就是最权威的,这就是官方文档的牛逼之处,但无论此处是否将服务及之间的关系说多么清楚,要想拆分这些应用层服务都并不是一件容易的事情。

1. Open the server.xml file.
2. Edit the settings that appear after the following comment:
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
Find the following line:
maxProcessors="75"
and change it to the following:
maxProcessors="1000"
3. Find the following line:
acceptCount="100"
and change it to the following:
acceptCount="500"
4. Save the updated server.xml file.

调整一些Tomcat的默认参数。

Reports that are distributed globally take longer to open in remote locations than to open locally. in addition, HTML reports take longer than PDF reports to open because more requests are processed or HTML reports.

HTML格式的报表比格式化报表的执行时间长,如PDF; 但是HTML可以分页展示。

后记:

安装部署文档交代了gateway和CM的调度方式,但是没有详细交代dispatcher的调度方式。

你注《石头记》,我注英文档。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值