-1

I want my App Engine project to be able to receive/handle traffic that comes in from a custom port (i.e. https://www.my-appengine-project.com:12999/some-endpoint)

I'm currently using a Google Cloud external HTTPS Load Balancer, but it seems that you can only configure it to receive traffic on port 443.

https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications

What can I do to make this work? I need to receive traffic on a specific port.

Alex
  • 5,141
  • 12
  • 26

1 Answers1

3

You cannot implement custom port numbers with the Google Cloud HTTP/HTTPS Load Balancer. The supported backend port numbers are 80 and 8080 for HTTP and only 443 for HTTPS.

Reference: Forwarding Rules and Addresses

If you want to modify App Engine to listen on port 12999 then you cannot use domain names (only IP addresses).

In summary, you will need to switch to another service such as Compute Engine.

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • How would that work with Compute Engine? Wouldn't the Compute Engine instances sit behind a Google Cloud Load Balancer also? And how do I get App engine to listen to a port? Are you referring to this https://cloud.google.com/appengine/docs/flexible/python/reference/app-yaml#port_forwarding? That only works in the flex environment right? – Alex Sep 17 '21 at 18:21
  • @Alex Since you cannot use a load balancer and you cannot use App Engine (with a domain name), you will need to use another compute based service. Compute Engine does not require a load balancer and you can configure just about anything. IMHO, with the advent of containers and microservices, virtual machines are often overlooked today. In many cases, VMs provide better solutions. – John Hanley Sep 17 '21 at 18:49