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
Don't use a servingURL. Get images directly:
https://storage.googleapis.com/myBucket/avatar.png
https://storage.googleapis.com/myBucket/12345_avatar.png
https://storage.googleapis.com/myBucket/12345/avatar.png
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.