LinkedIn
Copied!

Table of Contents

Best practices for writing background processing work

Version:

Only available versions of this content are shown in the dropdown

To maintain and manage your work resources and to ensure that resource performance is not compromised if a node becomes unexpectedly unavailable, design your work assignments to be thread-safe and use a multi-threaded environment.

To ensure your work resources remain thread-safe, follow these best practices:

  • Instead of agents, use Job Schedulers and Queue Processors for all new development. Agent rules are no longer being actively developed; Queue Processor rules replace standard agents. For best performance and maintainability, replace agents with Queue Processor rules. For more information, see Use Job Scheduler and Queue Processor rules instead of agents.
  • For advanced agents, ensure that any custom actions are thread-safe or specify that the agent runs only on one node at a time. For more information, see Avoiding race conditions for advanced agents. For more information about client-required post-upgrade steps in Pega Cloud Services environments, see Post-upgrade tasks following Pega Platform upgrades (7.x to 8.x) in Pega Cloud Services environments on Pega Community.
  • For Pega Cloud Services environments: Associate resources with node types rather than with specific node names or node IDs; associating a resource with a node ID can cause the resource to stop unexpectedly when the node is replaced, for example, due to a health check failure.
  • For on-premises environments:
    • To apply one or more node types to a node, use the JVM argument -DNodeTypes. For more information, see Assigning node types to nodes for on-premises environments.
    • To ensure system availability in the event that a node goes down unexpectedly, assign the same node type to multiple node instances.
    • Associate resources with node types rather than with specific node names or node IDs; this avoids resource failure if a node fails or you stop a node for maintenance.
  • Keystores

    A keystore is a file that contains keys and certificates that you use for encryption, authentication, and serving content over HTTPS. In Pega Platform, you create a keystore data instance that points to a keystore file.

  • Keystores

    A keystore is a file that contains keys and certificates that you use for encryption, authentication, and serving content over HTTPS. In Pega Platform, you create a keystore data instance that points to a keystore file.

  • Agents

    An agent is an internal background process operating on the server that runs activities on a periodic basis. In a multinode cluster, an agent can run on multiple nodes.

  • Managing listeners

    Use Admin Studio to manage listeners to debug and trace any problems with listener activity. You can view lists of available listeners. and associated nodes. You can also start, stop, restart, and trace listeners.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.