![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
![[z/OS]](../images/ngzos.gif)
建立和配置 ODR
隨需應變路由器 (ODR) 是「智慧型管理」中的一種智慧型 HTTP 和階段作業起始通訊協定 (SIP) Proxy 伺服器。ODR 是進入「智慧型管理」環境的進入點,是一種閘道,HTTP 要求和階段作業起始通訊協定 (SIP) 訊息可經由它,流到後端應用程式伺服器。您可以配置 ODR,以決定要如何處理失敗情況,以及如何調整特定的工作要求。
![[z/OS]](../images/ngzos.gif)
開始之前
z/OS® 作業系統不支援 SIP。

如今我們在 Apache 或 IBM HTTP Web 伺服器外掛程式中,支援一部分的 ODR 功能。如需相關資訊,請閱讀有關 Web 伺服器的「智慧型管理」的說明。
關於這項作業
對於較不重要的應用程式,ODR 可以暫時將要求放在佇列中,以便能更快速地處理較為重要之應用程式的要求,或保護後端應用程式伺服器免於超載。ODR 可以察覺到動態叢集實例的現行位置,如此就能將要求遞送到正確的端點。ODR 也可以根據處理程序的使用率和回應時間,動態調整送往每一個個別伺服器實例的資料流量。ODR 會執行 WLOR(加權後最少的未完成要求)負載平衡,以便在沒有親緣性或親緣性中斷時,選取叢集內的伺服器。
依預設,ODR 會連結至埠 80 和 443 以接聽 HTTP 和 HTTPS,而這需要以 root 使用者身分來執行 ODR 才行。如果您想以非 root 使用者身分來執行 ODR,必須變更 PROXY 接聽埠,使其值大於 1024。
ODR 能完全察覺到 Cell 的動態狀態,因此,在 Cell 中只要有一部伺服器失效,就會將要求遞送至另一部伺服器。當 ODR 獲知應用程式已在重新啟動的伺服器上起始設定,ODR 就會重新將要求遞送給該伺服器。
ODR 不會將任何要求遞送到應用程式伺服器上的應用程式,必須等該應用程式完成啟動或起始設定才行。如果應用程式在其他應用程式伺服器上啟動,就會將要求遞送給它們。如果應用程式沒有在其他任何伺服器上啟動,ODR 仍舊不會遞送到還在啟動中的應用程式伺服器。反而會傳回 503 訊息。
程序
- 如需 ODR 的相關資訊,請閱讀有關建立 ODR 的說明。
ODR 是一部 Proxy 伺服器,具有用來將工作遞送至伺服器節點的進階功能。DMZ 中不支援 ODR 的配置。如果要將 ODR 配置成執行 SSL 卸載,請閱讀有關配置所有 HTTPS 資料流量的 SSL 卸載的說明。如需其他自訂內容的相關資訊,請閱讀有關隨需應變路由器系統和自訂內容的說明。
- 遵循 Proxy 伺服器設定主題中的 WebSphere® Application
Server Network Deployment 指示,來配置 ODR。如需「智慧型管理」特定欄位的相關資訊,請閱讀有關配置 ODR 的說明。
避免困難: 在「智慧型管理」管理主控台中,利用下列路徑來定義 ODR 的配置:伺服器 > 伺服器類型 > 隨需應變路由器 > odr_name > 隨需應變路由器設定 > 隨需應變路由器內容。gotcha
- 依預設,ODR 會將送入的通訊協定與送出的通訊協定互相比對。若為入埠 HTTP 要求,會透過出埠 HTTP 來轉遞要求。若為入埠 HTTPS,會透過出埠 HTTPS 來轉遞要求。您可以針對 ODR 所處理的所有 HTTP 和 HTTPS 資料流量,或是依 Web 模組,來變更這項預設行為。如需相關資訊,請閱讀有關配置所有 HTTPS 資料流量的 SSL 卸載的說明。
- 您可以使用 ODR 自訂內容,來變更 ODR 的行為。舉例來說,您可以變更當因為處理器或記憶體超載而拒絕訊息時,ODR 所要傳回的錯誤碼。如需相關資訊,請閱讀有關隨需應變路由器系統和自訂內容的說明。
- Web 伺服器應該配置成授信安全 Proxy,這是因為容許授信安全 Proxy 將虛擬主機名稱或使用者身分等之類的資訊,放在私密 HTTP 標頭中傳遞給 ODR。如需相關資訊,請閱讀有關將 Web 伺服器配置成授信 Proxy 伺服器的說明。
- 定義通用伺服器叢集的遞送原則。
- SIP 的遞送和服務原則定義在 ODR 中。如需相關資訊,請閱讀有關定義服務原則的說明。
- 您可以選擇性地使用 Scripting 來建立遞送規則。如需相關資訊,請參閱 Intelligent Management: rules for ODR routing policy administrative tasks 和 manageODR.py script。
下一步
次主題
Creating ODRs
You can create on demand routers (ODRs) to route requests to 智慧型管理 nodes. The ODR is fully aware of the dynamic state of the cell, so that if one server in the cell fails, the requests are routed to another server. The configuration of the ODR in the DMZ is not supported.createodr.jacl script
You can use the createodr.jacl script to create an on demand router (ODR) from the command line.dumpIMPState.py script
Use the dumpIMPState.py script to record the state of various 智慧型管理 processes. You can use this script for problem diagnosis and debugging purposes when requested by IBM® support. The detailed state of the on demand router (ODR), the deployment manager, and application server processes are displayed when using this script.dumpOdrState.jacl script
You can use the dumpOdrState.jacl script to dump on demand router (ODR) states, and for problem diagnosis and debugging purposes. The detailed state of the queues and throttles of each gateway running in the ODR, as well as other global counters, are returned.deleteodr.jacl script
You can use the deleteodr.jacl script to delete an on demand router (ODR) from the command line.Configuring ODRs
You can configure an on demand router (ODR) to determine how it handles failure scenarios and tunes certain work requests. You can configure the connections and requests to the application server, configure the requests that must be rejected, define how error responses are handled, and specify the location of the proxy logs. The configuration of the ODR in the DMZ is not supported.manageODR.py script
You can use the manageODR.py script to create a cluster of on demand routers (ODRs), and to manage routing rules and custom logging.manageODC.py script
manageODC.py permits the interaction with the On Demand Configuration (ODC) tree. The ODC tree is an in-memory representation of the state of a WebSphere Application Server cell.odrDebug.py script
You can use the odrDebug.py script to diagnose errors that an on demand router (ODR) returns.Intelligent Management: on demand router system and custom properties
You can use on demand router (ODR) custom properties to change the behavior of your ODR. For example, you can change the error code that the ODR returns when messages are rejected because of processor or memory overload. To set a custom property on the ODR in the administrative console, click Servers > On demand routers > on_demand_router > Java and Process Management > Process definition > Java Virtual Machine.Configuring a Web server as a trusted proxy server
If your environment includes a Web server, you must configure it as a trusted secure proxy server. By configuring the secure proxy server, you can inform the on demand router (ODR) that the Web server is a trusted secure proxy so that the ODR can receive requests.Enabling cell affinity
The cell affinity function preserves sessions even in the event of an on demand router (ODR) outage when you configure unbridged, on demand router (ODR) topologies.Using the binary trace facility
智慧型管理 provides a binary trace facility (BTF) that permits the gathering of trace information in a production environment with a minimal impact on performance. The BTF is useful for both customers and development teams because its efficiency facilitates leaving a basic level of trace on all the time; thus, it is frequently the case that the data necessary for troubleshooting a problem has been captured the first time it occurs.Tuning the on demand router (ODR)
ODRs are intelligent routers for SIP and HTTP traffic, acting as intermediaries for application servers and webs ervers. There are many factors that affect ODR performance; in order to get the optimal performance from your ODRs, it is sometimes necessary to tune them.配置自訂日誌
透過配置自訂日誌,您可以確定要在日誌中擷取什麼資料,及如何顯示所記載的資料。 您可以利用 wsadmin 指令、透過規則集管理作業,或透過使用 manageODR.py Script 來配置自訂日誌。Configuring SSL offload for all HTTPS traffic
You can change the default outgoing protocol for requests that go through the on demand router. By default, the on demand router matches the incoming protocol to the outgoing protocol.Configuring SSL offload for partial HTTPS traffic
Configure the ODR to perform SSL offload for partial HTTPS traffic, or on a per-web module basis.Integrating the SIP on demand router with Load Balancer
You can integrate the Session Initiation Protocol (SIP) on demand router (ODR) with Load Balancer. Load Balancer for IBM WebSphere Application Server can help maximize the potential of your website by providing a powerful, flexible, and scalable solution to peak-demand problems.serverQuiesce.py script
You can use the serverQuiesce.py script to decrease workload to a Session Initiation Protocol (SIP) container over an interval, and optionally stop the server. You can also cancel the quiesce during a set time interval if certain conditions are met.Defining routing policies for generic server clusters
You can define routing policies for generic server clusters. A routing policy is a set of rules that determine how the server routes incoming requests.Intelligent Management: rules for ODR routing policy administrative tasks
You can use administrative tasks to configure HTTP or Session Initiation Protocol (SIP) rules for the on demand router (ODR) routing policy.Defining service policies for generic server clusters
Optionally, you can define service policies for generic server clusters.Intelligent Management: rules for ODR service policy administrative tasks
You can use administrative tasks to configure Session Initiation Protocol (SIP) or HTTP rules for an on demand router (ODR) service policy.Intelligent Management: service policy custom properties
You can use service policy custom properties to provide service policy alerting for persistent service policy violations on a transaction class basis. When a violation is reported, a runtime task is generated by a runtime component within 智慧型管理. A task provides information from which you can accept or deny the suggested action plan.BBSON bulletin board
智慧型管理 offers a bulletin board service overlay network (BBSON) that is independent of the WebSphere Application Server Network Deployment high availability manager. The high availability manager provides a mechanism that allows servers to easily exchange state data. This mechanism is commonly referred to as the bulletin board.Topology Configurations for Multi-Cell Routing
In a multi-cell situation you have two topology options for configuring multi-cell routing preference rules for applications that exist in two cells, which we consider to be recommended best practices. Neither of these topologies employ core-group bridges and for Versions 7.x and higher it is discouraged to use core-group bridges to link cells.Configuring an ODR to dynamically update the web server plug-in configuration
In a topology with a web server which forwards requests to an on demand router (ODR), the ODR can be set to dynamically generate and update the web server plug-in configuration file plugin-cfg.xml. By configuring an ODR to dynamically update plugin-cfg.xml, you avoid manually updating the file during administrative actions, which can affect the content.在高可用性環境中產生外掛程式配置
在高可用性環境中,您可以將 Web 伺服器配置成產生外掛程式配置。這樣一來,您可確保不論其他程序如何(可能無法使用),Cell 中會有一項程序產生配置。Segregating HTTP traffic by ODR clusters
The high availability plugin-cfg generation service automatically regenerates and propagates the web server plug-in configuration file each time a change is made, which should affect how the plug-in routes. When you use this service, the web server plug-in routes traffic by application, deployment target, or node group to a specific ODR cluster.Intelligent Management: controlling the generation of the plugin-cfg.xml file
You can override the default attribute values of the plugin-cfg.xml file that is automatically generated by the on demand router (ODR).Propagating the plugin-cfg.xml file to web servers
For web servers that are defined in the WebSphere Application Server Network Deployment (ND) configuration, you can automatically propagate the generated plugin-cfg.xml file to web servers using the autoPropagate keyword option, or by using the propagatePluginCfg.py script.propagatePluginCfg.py script
Use the propagatePluginCfg.py script to automatically propagate the generated plugin-cfg.xml file.Routing requests directly from a web server to a back-end application server
Define a new custom property to configure the web server plug-in configuration to route requests directly from the web server to a back-end application server. You can configure certain requests to route through an on demand router (ODR) and configure other requests to route directly to a back-end application server.Configuring passive HTTP session affinity in the on demand router
When the on demand router (ODR) processes a request, it obtains the session affinity descriptor policy of the cluster to which the server belongs. If you changed the default settings for any middleware servers, you might need to update the middleware descriptor properties so that the ODR can obtain the descriptor policy. In most cases, the on demand router (ODR) does not require configuration to support HTTP session affinity. However, some special cases exist where you must configure the ODR to learn about backup servers that the back end servers might be setting on the session affinity cookie.Configuring the on demand router for multi-cluster failover and load balancing routing
To configure the on demand router (ODR) to route requests to a different cluster, use custom properties for multi-cluster failover and load balancing routing policies. Route requests to a cluster in another cell if your primary cluster fails, if you want to balance the load between multiple clusters in your environment, or if you want to route requests to a specific cluster.Configuring ODR OutOfMemory prevention
You can create cell-level custom properties to prevent the on demand router (ODR) from running out of memory when the number of concurrent requests sent to the ODR increases.


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twve_odr
檔名:twve_odr.html