I want a servingURL out of a image-file stored in a Google-CS bucket, which is named by myself:
I want to name the servingURL myself. I have a seperate microservice which should define the name of the servingURL. In that case I don't have to make a roundtrip from Google-AE to my microservice since the microservice handles the authorization.
Is there a way to define a servingURL name explicit?
Don't use a servingURL. Get images directly:
or any other pattern that you use for storing your images.
Then you have no extra roundtrips.
Not possible when using
getServingUrl
, no such option in ServingUrlOptions:https://cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/images/ServingUrlOptions
However nothing stops you from teaching your microservice to directly serve a GCS file under a custom URL. You might be able to even overlay the regular file access with an image processing library to obtain your own customized image-only serving (micro)service :)
The extra cost would be the associated instance uptime related to actually serving the images. Typically not an issue if your instance(s) stay alive anyways to serve other kinds of traffic.
One thing to consider would be the image download duration exceeding the request deadline. Typically not an issue for small images.