Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Serverless Containers
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
  • Concepts
    • Overview
    • Container
    • Invoking a container
    • Networking
    • Runtime environments
    • Trigger
    • Dead Letter Queue
    • Container logs
    • Backups
    • Quotas and limits
  • Practical guidelines
  • Access management
  • Pricing policy
  • Containers API reference
  • API Triggers reference
  • Questions and answers
  1. Concepts
  2. Invoking a container

Invoking a container in Serverless Containers

Written by
Yandex Cloud
  • HTTPS
    • Filtering message headers
    • IP address of the request source
  • Triggers
  • Yandex API Gateway extension

You can invoke a container:

  • Using HTTPS.
  • Using a trigger.
  • Using a Yandex API Gateway extension.

The application must retrieve the number of the port for receiving requests, from the PORT environment variable. The variable value is set by the service automatically.

HTTPS

When calling a container over HTTPS, an HTTP request is passed to the application deployed in the container.

Filtering message headers

When being passed to the container, some HTTP request and response headers change, as described below.

Request headers
Response headers

Removed from a request:

  • "Expect"
  • "Te"
  • "Trailer"
  • "Upgrade"
  • "Proxy-Authenticate"
  • "Authorization"
  • "Connection"
  • "Content-Md5"
  • "Max-Forwards"
  • "Server"
  • "Transfer-Encoding"
  • "Www-Authenticate"
  • "Cookie"
  • Removed from a response:

    • "Host"
    • "Authorization"
    • "User-Agent"
    • "Connection"
    • "Max-Forwards"
    • "Cookie"
  • Cause an error if present in a response:

    • "Proxy-Authenticate"
    • "Transfer-Encoding"
    • "Via"
  • Overwritten by adding the X-Yf-Remapped- prefix:

    • "Content-Md5"
    • "Date"
    • "Server"
    • "Www-Authenticate"

IP address of the request source

If the request contains the X-Forwarded-For header, it transmits both the specified IP addresses and the IP address of the user who invoked the container. If this header is missing, the request only transmits the IP address of the user who invoked the container.

Triggers

When invoking a container using a trigger, the JSON description of a trigger event is passed in the body of an HTTP request to the container. The request source IP is passed in the same way as when invoking a container using HTTPS. Learn more about triggers.

Yandex API Gateway extension

When invoking a container using the API Gateway, the container is handed over an HTTP request addressed to the API gateway. In this case, the Host header specifies the host on which the user accessed the API gateway rather than the container's host. The request source IP is passed in the same way as when invoking a container using HTTPS. Learn more about the extension in the Yandex API Gateway documentation.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • HTTPS
  • Filtering message headers
  • IP address of the request source
  • Triggers
  • Yandex API Gateway extension