google-app-enginegoogle-cloud-platformload-balancingblobstore

Google Cloud Loadbalancer not working with App Engine Blobstore


We've just created a new Loadbalancer which works perfectly well with all our services. The only issue we have is with the Blobstore.

The initial blobservice request works - returning a URL for the upload. But executing that request (/_ah/upload/) fails with a 404. My understanding is that it should be redirected to the blobstore service which will then send a response with the upload id. This works fine without the load balancer.

I can't see a way to add the blobstore as a service, so I don't know what to do to make sure the request is routed to the correct place.

Any help is gratefully appreciated!


Solution

  • This is currently a known limitation with Blobstore when used in an HTTPS load balancer in App Engine.

    With the App Engine to Blobstore service, the generated URL for upload is shared to Google Front End. When the Load Balancer is introduced, the App Engine URL is returned, and causes a 302 redirect. The returned URL is used as a relative path to connect via the load balancer, and as it is not aligned to the one expected by the GFE, a 404 response is thrown.

    Blobstore is a legacy API and has been deprecated, and with the limitations it has, it is ideal to look for alternatives.

    You can consider using Cloud Storage, as mentioned in this overview. It is possible to achieve the upload behavior through Cloud Storage signed URLs which bypasses the App Engine Upload component. It would be necessary to implement a further component to notify on completion, such as a Pub/Sub for new object creation, if that information is needed.

    Besides Cloud Storage, you can check other replacement options for Blobstore in this documentation.