Propagating Error messages in Google Cloud Platform (GCP)

mobileideafactory.com

I am building a near real time service. The input is a cloud storage bucket and blob path to a photo image. This horizontally-scalable service is made up of multiple components including ML models running on k8s and Google Cloud Functions, each of which has a chance of failing for a variety of reasons. The ML models are independent and run in parallel. Each component is triggered by a PubSub push message topic unique to the component. Running the entire flow for one photo may take 15 seconds.

I want to return a meaning error message back to the service requester telling which component failed if there is a failure. Essentially, I want to report which image failed and where it failed.

What is the recommended practice for returning an error back to the requester?

guillaume blaquiere

There is no built in service for this. But, because you already use PubSub for asynchronous call, I propose to use it also to push back the error.

You can do this in 2 flavors

First, create a PubSub topic for the errors, let's say 'error_topic'

1. Without message customization

  • In the PubSub message, the requester put which it is in the attribute (let's say 'requester' attribute name)
  • In the consumer service, if an error occurs, return an error code (500 for example) for push subscription or a NACK in pull subscription.
  • Configure the PubSub subscription to manage retry and dead letter topic (the dead letter topic is 'error_topic')
  • Then, create one subscription per requester on the 'error_topic' (use the filter capability for this) and consume the message in the requester services

2. With message customization

  • In the PubSub message, the requester put which it is in the attribute (let's say 'requester' attribute name)
  • The consumer service that raises the error create a new message with custom information and copies the 'requester' attribute value and then puts it in attribute of the message in the 'error_topic' (let's say 'original_requester' attribute name).
  • Then, create one subscription per requester on the 'error_topic' (use the filter capability for this) and consume the message in the requester services

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Error Python API GCP Data Catalog - Google Cloud Platform

From Dev

GCP: Full backup of the database in the google cloud platform

From Dev

Google Cloud Platform (GCP) Ingress unhealthy backend

From Dev

GCP: Duplicate an existing project in Google Cloud Platform

From Dev

Accessing GCP Memorystore from Google Cloud Platform Cloud Shell

From Dev

Google Cloud Platform (GCP) Cloud Shell "Boost" feature missing

From Dev

Is there a way to change a google cloud platform project to other GCP account?

From Dev

Google Cloud Platform (GCP): How to give additional roles to service account?

From Dev

How to monitor Google Cloud Platform (GCP) costs on an hourly basis?

From Dev

Google cloud AI platform error in executing job

From Dev

Using Error report of Google Cloud Platform with ExpressJS

From Dev

Docker image run error on Google Cloud Platform

From Dev

Error installing fbprophet on Google Cloud Platform AI Platform

From Dev

How to connect to a GCP (Google Cloud Platform) Cloud SQL instance from an IPV6 address?

From Dev

Google Play Security alert about Google Cloud Platform (GCP) API keys

From Dev

Google Cloud Platform: Is there a way to ignore Pub/Sub messages if a Cloud Function is already processing?

From Dev

"Invalid gcp.key" from Mongoose OS when connecting ESP32 to Google Cloud Platform

From Dev

What is the difference between "Cool down period" and "Initial delay" in the "Instance Groups" in the Google Cloud Platform (GCP)?

From Dev

Google Cloud Platform: How to fetch permissions assigned for particular Identity across all GCP resources via REST call

From Dev

How do you schedule GCP AI Platform notebooks via Google Cloud Composer?

From Dev

Google Cloud Platform (GCP) Free Tier 30 GB-months HDD includes standard or SSD persistent disk?

From Dev

How to list, find, or search iam policies across services (APIs), resource types, and projects in google cloud platform (GCP)?

From Dev

GCP AI Platform cannot read .SAV file stored in Google Cloud Storage (Python)

From

Go GCP Cloud PubSub not batch publishing messages

From Dev

Google Cloud Platform architecture

From Dev

Google Cloud Platform with Firebase

From Dev

Authentication in Google Cloud Platform

From Dev

Google Cloud Platform - receiving a 502 error for a backend not passing health checks

From Dev

Memory allocation error on Google cloud platform VM Instance for Keras Model

Related Related

  1. 1

    Error Python API GCP Data Catalog - Google Cloud Platform

  2. 2

    GCP: Full backup of the database in the google cloud platform

  3. 3

    Google Cloud Platform (GCP) Ingress unhealthy backend

  4. 4

    GCP: Duplicate an existing project in Google Cloud Platform

  5. 5

    Accessing GCP Memorystore from Google Cloud Platform Cloud Shell

  6. 6

    Google Cloud Platform (GCP) Cloud Shell "Boost" feature missing

  7. 7

    Is there a way to change a google cloud platform project to other GCP account?

  8. 8

    Google Cloud Platform (GCP): How to give additional roles to service account?

  9. 9

    How to monitor Google Cloud Platform (GCP) costs on an hourly basis?

  10. 10

    Google cloud AI platform error in executing job

  11. 11

    Using Error report of Google Cloud Platform with ExpressJS

  12. 12

    Docker image run error on Google Cloud Platform

  13. 13

    Error installing fbprophet on Google Cloud Platform AI Platform

  14. 14

    How to connect to a GCP (Google Cloud Platform) Cloud SQL instance from an IPV6 address?

  15. 15

    Google Play Security alert about Google Cloud Platform (GCP) API keys

  16. 16

    Google Cloud Platform: Is there a way to ignore Pub/Sub messages if a Cloud Function is already processing?

  17. 17

    "Invalid gcp.key" from Mongoose OS when connecting ESP32 to Google Cloud Platform

  18. 18

    What is the difference between "Cool down period" and "Initial delay" in the "Instance Groups" in the Google Cloud Platform (GCP)?

  19. 19

    Google Cloud Platform: How to fetch permissions assigned for particular Identity across all GCP resources via REST call

  20. 20

    How do you schedule GCP AI Platform notebooks via Google Cloud Composer?

  21. 21

    Google Cloud Platform (GCP) Free Tier 30 GB-months HDD includes standard or SSD persistent disk?

  22. 22

    How to list, find, or search iam policies across services (APIs), resource types, and projects in google cloud platform (GCP)?

  23. 23

    GCP AI Platform cannot read .SAV file stored in Google Cloud Storage (Python)

  24. 24

    Go GCP Cloud PubSub not batch publishing messages

  25. 25

    Google Cloud Platform architecture

  26. 26

    Google Cloud Platform with Firebase

  27. 27

    Authentication in Google Cloud Platform

  28. 28

    Google Cloud Platform - receiving a 502 error for a backend not passing health checks

  29. 29

    Memory allocation error on Google cloud platform VM Instance for Keras Model

HotTag

Archive