

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# haproxy 属性
<a name="attributes-recipes-haproxy"></a>

**重要**  
この AWS OpsWorks Stacks サービスは 2024 年 5 月 26 日にサポート終了となり、新規および既存のお客様の両方で無効になっています。できるだけ早くワークロードを他のソリューションに移行することを強くお勧めします。移行についてご質問がある場合は、[AWS re:Post](https://repost.aws/) または[AWS プレミアムサポート](https://aws.amazon.com/support)を通じて AWS サポート チームにお問い合わせください。

**注記**  
これらの属性は Linux スタックにのみ使用できます。

[`haproxy` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/haproxy/attributes/default.rb)は [HAProxy サーバー](http://haproxy.1wt.eu/)設定を指定します。詳細については、「[HAProxy ドキュメント](http://cbonte.github.io/haproxy-dconv/configuration-1.5.html)」を参照してください。組み込み属性を上書きしてカスタム値を指定する方法の詳細については、「[属性の上書き](workingcookbook-attributes.md)」を参照してください。


****  

|  |  |  | 
| --- |--- |--- |
| [balance ](#attributes-recipes-haproxy-balance) | [check\$1interval ](#attributes-recipes-haproxy-interval) | [client\$1timeout ](#attributes-recipes-haproxy-client-timeout) | 
| [connect\$1timeout ](#attributes-recipes-haproxy-connect-timeout) | [default\$1max\$1connections ](#attributes-recipes-haproxy-default-max) | [global\$1max\$1connections ](#attributes-recipes-haproxy-global-max) | 
| [health\$1check\$1method ](#attributes-recipes-haproxy-health-method) | [health\$1check\$1url ](#attributes-recipes-haproxy-health-url) | [queue\$1timeout ](#attributes-recipes-haproxy-queue-timeout) | 
| [http\$1request\$1timeout ](#attributes-recipes-haproxy-http-timeout) | [maxcon\$1factor\$1nodejs\$1app ](#attributes-recipes-haproxy-nodejs-app) | [maxcon\$1factor\$1nodejs\$1app\$1ssl ](#attributes-recipes-haproxy-nodejs-ssl) | 
| [maxcon\$1factor\$1php\$1app ](#attributes-recipes-haproxy-php-app) | [maxcon\$1factor\$1php\$1app\$1ssl ](#attributes-recipes-haproxy-php-ssl) | [maxcon\$1factor\$1rails\$1app ](#attributes-recipes-haproxy-rails-app) | 
| [maxcon\$1factor\$1rails\$1app\$1ssl ](#attributes-recipes-haproxy-rails-ssl) | [maxcon\$1factor\$1static ](#attributes-recipes-haproxy-static-app) | [maxcon\$1factor\$1static\$1ssl ](#attributes-recipes-haproxy-static-ssl) | 
| [retries ](#attributes-recipes-haproxy-retries) | [server\$1timeout ](#attributes-recipes-haproxy-server-timeout) | [stats\$1url ](#attributes-recipes-haproxy-stats-url) | 
| [stats\$1user ](#attributes-recipes-haproxy-user) |  |  | 

**balance **  <a name="attributes-recipes-haproxy-balance"></a>
サーバーを選択するためにロードバランサーが使用するアルゴリズムです (文字列)。デフォルト値は `'roundrobin'` です。その他のオプションは次のとおりです。  
+ 'static-rr'
+ 'leastconn'
+ 'source'
+ 'uri'
+ 'url\$1param'
+ 'hdr(name)'
+ 'rdp-cookie'
+ 'rdp-cookie(name)'
これらの引数の詳細については、「[balance](http://cbonte.github.io/haproxy-dconv/configuration-1.5.html)」を参照してください。  

```
node[:haproxy][:balance]
```

**check\$1interval **  <a name="attributes-recipes-haproxy-interval"></a>
ヘルスチェックの間隔 (文字列)。デフォルト値は `'10s'` です。  

```
node[:haproxy][:check_interval]
```

**client\$1timeout **  <a name="attributes-recipes-haproxy-client-timeout"></a>
クライアントを非アクティブにすることができる最大時間 (文字列)。デフォルト値は `'60s'` です。  

```
node[:haproxy][:client_timeout]
```

**connect\$1timeout **  <a name="attributes-recipes-haproxy-connect-timeout"></a>
HAProxy がサーバー接続試行の成功を待機する最大時間 (文字列)。デフォルト値は `'10s'` です。  

```
node[:haproxy][:connect_timeout]
```

**default\$1max\$1connections **  <a name="attributes-recipes-haproxy-default-max"></a>
接続の最大数のデフォルト値 (文字列)。デフォルト値は `'80000'` です。  

```
node[:haproxy][:default_max_connections]
```

**global\$1max\$1connections **  <a name="attributes-recipes-haproxy-global-max"></a>
接続の最大数 (文字列)。デフォルト値は `'80000'` です。  

```
node[:haproxy][:global_max_connections]
```

**health\$1check\$1method **  <a name="attributes-recipes-haproxy-health-method"></a>
ヘルスチェックの方法 (文字列)。デフォルト値は `'OPTIONS'` です。  

```
node[:haproxy][:health_check_method]
```

**health\$1check\$1url **  <a name="attributes-recipes-haproxy-health-url"></a>
サーバの状態を確認するために使用される URL パス (文字列)。デフォルト値は `'/'` です。  

```
node[:haproxy][:health_check_url ]
```

**queue\$1timeout **  <a name="attributes-recipes-haproxy-queue-timeout"></a>
無料接続を待機する最大時間 (文字列)。デフォルト値は `'120s'` です。  

```
node[:haproxy][:queue_timeout]
```

**http\$1request\$1timeout **  <a name="attributes-recipes-haproxy-http-timeout"></a>
HAProxy が完全な HTTP リクエストを待機する最大時間 (文字列)。デフォルト値は `'30s'` です。  

```
node[:haproxy][:http_request_timeout]
```

**retries **  <a name="attributes-recipes-haproxy-retries"></a>
サーバー接続が失敗した後の再試行の数 (文字列)。デフォルト値は `'3'` です。  

```
node[:haproxy][:retries]
```

**server\$1timeout **  <a name="attributes-recipes-haproxy-server-timeout"></a>
クライアントを非アクティブにすることができる最大時間 (文字列)。デフォルト値は `'60s'` です。  

```
node[:haproxy][:server_timeout]
```

**stats\$1url **  <a name="attributes-recipes-haproxy-stats-url"></a>
統計ページの URL パス (文字列)。デフォルト値は `'/haproxy?stats'` です。  

```
node[:haproxy][:stats_url]
```

**stats\$1user **  <a name="attributes-recipes-haproxy-user"></a>
統計ページのユーザー名 (文字列)。デフォルト値は `'opsworks'` です。  

```
node[:haproxy][:stats_user]
```

`maxcon` 属性は、HAProxy が[バックエンド](attributes-json-opsworks-instance.md#attributes-json-opsworks-instance-backends)に対して許可する最大接続数の計算に使用される負荷要因の乗数を表します。たとえば、`backend`値が 4 の小さなインスタンスに Rails アプリケーションサーバーがあるとします。つまり、スタックはそのインスタンスに 4 OpsWorks つの Rails プロセスを設定します。`maxcon_factor_rails_app` のデフォルト値の 7 を使用した場合、HAProxy は Rails サーバーに対する 28 個 (4 x 7) の接続を処理します。

**maxcon\$1factor\$1nodejs\$1app **  <a name="attributes-recipes-haproxy-nodejs-app"></a>
Node.js アプリケーションサーバーの maxcon 要素 (数値)。デフォルト値は `10` です。  

```
node[:haproxy][:maxcon_factor_nodejs_app]
```

**maxcon\$1factor\$1nodejs\$1app\$1ssl **  <a name="attributes-recipes-haproxy-nodejs-ssl"></a>
SSL を使用する Node.js アプリケーションサーバーの maxcon 要素 (数値)。デフォルト値は `10` です。  

```
node[:haproxy][:maxcon_factor_nodejs_app_ssl]
```

**maxcon\$1factor\$1php\$1app **  <a name="attributes-recipes-haproxy-php-app"></a>
PHP アプリケーションサーバーの maxcon 要素 (数値)。デフォルト値は `10` です。  

```
node[:haproxy][:maxcon_factor_php_app]
```

**maxcon\$1factor\$1php\$1app\$1ssl **  <a name="attributes-recipes-haproxy-php-ssl"></a>
SSL を使用する PHP アプリケーションサーバーの maxcon 要素 (数値)。デフォルト値は `10` です。  

```
node[:haproxy][:maxcon_factor_php_app_ssl]
```

**maxcon\$1factor\$1rails\$1app **  <a name="attributes-recipes-haproxy-rails-app"></a>
Rails アプリケーションサーバーの maxcon 要素 (数値)。デフォルト値は `7` です。  

```
node[:haproxy][:maxcon_factor_rails_app]
```

**maxcon\$1factor\$1rails\$1app\$1ssl **  <a name="attributes-recipes-haproxy-rails-ssl"></a>
SSL を使用する Rails アプリケーションサーバーの maxcon 要素 (数値)。デフォルト値は `7` です。  

```
node[:haproxy][:maxcon_factor_rails_app_ssl]
```

**maxcon\$1factor\$1static **  <a name="attributes-recipes-haproxy-static-app"></a>
静的ウェブサーバーの maxcon 要素 (数値)。デフォルト値は `15` です。  

```
node[:haproxy][:maxcon_factor_static]
```

**maxcon\$1factor\$1static\$1ssl **  <a name="attributes-recipes-haproxy-static-ssl"></a>
SSL を使用する静的ウェブサーバーの maxcon 要素 (数値)。デフォルト値は `15` です。  

```
node[:haproxy][:maxcon_factor_static_ssl]
```