This is a cache of https://docs.openshift.com/container-platform/4.5/serverless/knative_serving/splitting-traffic-between-revisions.html. It is a snapshot of the page at 2024-11-26T01:13:40.396+0000.
Splitting traffic between revisions - Knative Serving | Serverless | OpenShift Container Platform 4.5
×

Splitting traffic between revisions using the Developer perspective

After you create a serverless application, the serverless application is displayed in the Topology view of the Developer perspective. The application revision is represented by the node and the serverless resource service is indicated by a quadrilateral around the node.

Any new change in the code or the service configuration triggers a revision, a snapshot of the code at a given time. For a service, you can manage the traffic between the revisions of the service by splitting and routing it to the different revisions as required.

Procedure

To split traffic between multiple revisions of an application in the Topology view:

  1. Click the serverless resource service, indicated by the quadrilateral, to see its overview in the side panel.

  2. Click the Resources tab, to see a list of Revisions and Routes for the service.

    odc serverless app
    Figure 1. Serverless application
  3. Click the service, indicated by the S icon at the top of the side panel, to see an overview of the service details.

  4. Click the YAML tab and modify the service configuration in the YAML editor, and click Save. For example, change the timeoutseconds from 300 to 301 . This change in the configuration triggers a new revision. In the Topology view, the latest revision is displayed and the Resources tab for the service now displays the two revisions.

  5. In the Resources tab, click the Set Traffic Distribution button to see the traffic distribution dialog box:

    1. Add the split traffic percentage portion for the two revisions in the Splits field.

    2. Add tags to create custom URLs for the two revisions.

    3. Click Save to see two nodes representing the two revisions in the Topology view.

      odc serverless revisions
      Figure 2. Serverless application revisions