You are here: Reference > Tools, accelerators, and wizards > How to deploy static content to an edge server
Deploying static content to an edge server
Note: This facility requires familiarity with web servers and HTTP operations.
In ordinary Web pages, the term static content usually refers to image files (JPG, PNG, GIF, SWF), style sheet files (CSS), and JavaScript files (JS) that change only infrequently.
When your application is in production use, these elements of your application's user interface are similarly considered static, even though they may differ from ruleset version to ruleset version. For example, a JavaScript routine — saved in a text file rule — is the same for all users who share one access group Alpha (and so have the same ruleset list). However, users who share a different access group — Beta — may execute a different version of the JavaScript function, from a different version text file rule, even if both Alpha and Beta users are associated with a single application rule.
Normally, the Pega 7 Platform extracts static content from rules (such as binary file rules and text file rules) to the server file system (within a subdirectory of the temporary file directory) upon first use. The second and later requests from users do not require execution of any of the Pega 7 Platform rules; the static content is served from the file.
To improve response in a large production system, you can deploy static content onto multiple Web servers, known informally as edge servers.
Procedure
Use this procedure only after initial production use of the application, to ensure that static content has been extracted for each access group that references the application rule.
- Identify an access group used by production users. Log in to the Designer Studio as a user in that access group.
- Click Designer Studio> Assembly> Extract Edge Server Files.
- Complete the form that appears:
- In the Select Rule Application field, select the Application Name key part of an application rule.
- In the Application Version field, select the Version key part of an application rule.
- Enter a file name for a ZIP file to be output.
- Click Create ZIP file. The activity runs and creates a ZIP file containing the static content, in a subdirectory of your system's
ServiceExport
directory named RemoteWebServers
.
- Identify the host name, TCP/IP port, and URL path of the edge server to which you wish to deploy the static content. Use FTP or similar facilities to copy the ZIP archive to each edge server. Unzip the contents. Enter a URL into a browser session, referencing one of the files, to confirm that the files are present and being served correctly.
- Return to Designer Studio. Copy the empty extension point activity Code-Security.ApplicationProfileSetup into a new ruleset that will be made available to application users, keeping both key parts.
- Update the Pages & Classes tab of the new Activity form to add a row for the page name pxRequestor, of class Code-Pega-Requestor.
- Replace the Step 1 of the activity with a Property-Set method that sets property pxRequestorpyEdgeServerURI to the appropriate path, such as: "http://edgeserver1:8080/EdgeServer"
- Save the Activity form.
- Update the application rule and access group to include the new ruleset version as a production ruleset.
- Log in as a user who uses the updated access group. Clear your Internet Explorer cache. Using an HTTP sniffer program such as Fiddler 2 (from www.fiddler2.com), verify that static content is served from the edge server.
Notes:
- If the static content changes, the extract and upload Steps 1 to 4 above must be repeated.
- If you have multiple edge servers, the access groups and new ruleset versions must be organized to align with the servers; the steps above must be repeated for each.
- The extraction tool records each execution as an instance of the Log-EdgeServer class, and errors if any appear in instances of the Log-EdgeServer-Error class. Use the Application Explorer to access and review these log entries.
Related information
Tools — System
System Administration category
Open topic with navigation