Fetching contributors…
Cannot retrieve contributors at this time
85 lines (63 sloc) 4.19 KB
title: Deploying a Large Application
owner: CAPI
<strong><%= modified_date %></strong>
This topic describes constraints and recommended settings for deploying
applications above 750 MB.
## <a id="consid_limits"></a>Deployment Considerations and Limitations ##
The deployment process involves uploading, staging, and starting the app. See the <a href="app-lifecycle.html#deployment">Deployment</a> section of the Application Container Lifecycle topic for more information about the default time limits for uploading, staging, and starting an app.
To deploy large apps to <%=vars.product_short%>, ensure the following:
* The total size of the files to upload for your app does not exceed <%= vars.max_app_size %>.
* Your network connection speed is sufficient to upload your app within the 15 minute limit. We recommends a minimum speed of 874 KB/s.
<p class="note"><strong>Note</strong>: <%=vars.product_short%> provides an authorization token that is valid for a minimum of 20 minutes.</p>
* You allocate enough memory for all instances of your app. Use either the `-m` flag with `cf push` or set an app memory value in your `manifest.yml` file.
* You allocate enough disk space for all instances of your app. Use either the `-k` flag with `cf push` or set a disk space allocation value in your `manifest.yml` file.
* If you use an app manifest file, `manifest.yml`, be sure to specify adequate values for your app for attributes such as app memory, app start timeout, and disk space allocation.
For more information about using manifests, refer to the [Deploying with Application Manifests](./manifest.html) topic.
* You push only the files that are necessary for your application.
To meet this requirement, push only the directory for your application, and remove unneeded files or use the `.cfignore` file to [specify excluded files](./prepare-to-deploy.html#exclude).
* You configure Cloud Foundry Command Line Interface (cf CLI) staging, startup, and timeout settings to override settings in the manifest, as necessary.
* `CF_STAGING_TIMEOUT`: Controls the maximum time that the cf CLI waits for an app to stage after Cloud Foundry successfully uploads and packages the app. Value set in minutes.
* `CF_STARTUP_TIMEOUT`: Controls the maximum time that the cf CLI waits for an app to start. Value set in minutes.
* `cf push -t TIMEOUT`: Controls the maximum time that Cloud Foundry allows to elapse between starting an app and the first healthy response from the app. When you use this flag, the cf CLI ignores any app start timeout value set in the manifest. Value set in seconds.
For more information about using the cf CLI to deploy apps, refer to the [Push section](../../cf-cli/getting-started.html#push) of the _Getting Started with the cf CLI_ topic.
<p class="note"><strong>Note</strong>: Changing the timeout setting for the cf CLI does not change the timeout limit for Cloud Foundry server-side jobs such as staging or starting applications. You must change server-side timeouts in the manifest. Because of the differences between the Cloud Foundry and cf CLI timeout values, your app might successfully start even though the cf CLI reports <code>App failed</code>. Run <code>cf apps APP_NAME</code> to review the actual status of your app.</p>
## <a id="limits_table"></a>Default Settings and Limitations Summary Table ##
This table provides summary information of constraints and default settings to consider when you deploy a large app to <%=vars.product_short%>.
<table border="1" class="nice" >
<td>App Package Size</td>
<td>Maximum: <%= vars.max_app_size_table %></td>
<td>Authorization Token Grace Period</td>
<td>Default: 20 minutes, minimum</td>
<td>cf CLI environment variable<br />
Default: 15 minutes</td>
<td>cf CLI environment variable<br />
Default: 5 minutes</td>
<td><code>cf push -t TIMEOUT</code></td>
<td>App start timeout maximum<br />
Default: 60 seconds<br /></td>
<td>Disk Space Allocation</td>
<td>Default: 1024 MB</td>
<td>Internet Connection Speed</td>
<td>Recommended Minimum: 874 KB/s</td>