Reputation: 370
I want to ask about the best way to implement Pub Sub with REST API.
I want to subscribe data from Pub/Sub, then I send the data via HTTP Rest API, which hits every endpoint per subscribe. And then, save into database after hit endpoint.
So, there are 3 jobs in the service.
My first approach will bee create two different service.
What is the best way to implement it?
What if the data from Pub/Sub becomes too much. Is it possible that the service could be down or slow?
I don't have much experience with Pub/Sub.
Thank you.
Upvotes: 0
Views: 1374
Reputation: 76000
Because your architecture is asynchronous, I propose you that approach
That architecture is idempotent and scalable. You can play with the concurrency parameter of Cloud Run to save money or speed up the process.
Upvotes: 2