此内容没有您所选择的语言版本。

6.2.2. Purpose of Districts


Districts define a set of node hosts that gears can reliably move between to manage node host resource usage. Red Hat requires using districts for production deployments, and they are enabled by default for deploying gears on new installations.
OpenShift Enterprise allocates resources to gears including an external port range and IP address range, calculated according to their numeric Linux user ID (UID) on the node. A gear can only move to a node where its UID is not already in use. Districts reserve a UID for the gear across all nodes in the district, meaning only the node hosting the gear uses its UID. This allows the gear to maintain the same UID and related resources when moved to any other node within the district.
A district's UID pool includes 6000 UIDs due to the limited range of external ports. Districts allocate these UIDs to gears randomly rather than sequentially. This random allocation method makes the availability of a gear's UID more likely, even when moving the gear to a new district. Without districts, nodes allocate gear UIDs locally and sequentially, making it extremely likely that a gear's UID will be in use on other nodes.
In previous versions of OpenShift Enterprise, it was possible to change a gear's UID on a gear move. However, this required reconfiguration of the related resources, impeded cartridge maintenance, and caused trouble for application developers with hard-coded resource settings, which could not be updated automatically. Disallowing UID changes during a gear move and using districts to reserve UIDs saves developers and administrators time and trouble.
Districts also allow you to mark a node as deactivated to ensure it receives no additional gears from the broker host. The existing gears continue to run until they are destroyed or moved to another node. This enables the decommissioning of a node with minimal disruption to its gears.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat