How to deploy static content to an edge server |
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 PRPC 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, PRPC 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 PRPC 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.
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.
1. Identify an access group used by production users. Log in to the Designer Studio as a user in that access group.
2 Select > Assembly> Extract Edge Server Files.
3. Complete the form that appears:
ServiceExport
directory named RemoteWebServers
. 4. 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.
5. 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.
6. Update the Pages & Classes tab of the new Activity form to add a row for the page name pxRequestor, of class Code-Pega-Requestor.
7. 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"
8. Save the Activity form.
9. Update the application rule and access group to include the new RuleSet version as a production RuleSet.
10. 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.
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.
This procedure applies for V6.1 and later. For V5.5, see PDN article 25587 How to improve response by distributing static content to remote edge servers.
static content, stream processing | |
static JavaServer Pages tag |