You should write data to the Cloud Pub/Sub queue, and the application should read data from the queue. -> Correct. Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. By writing data to a Pub/Sub queue, you can buffer the incoming data, preventing data loss when the virtual machines are unable to keep up with the incoming data. Applications can then read data from the queue at their own pace. This is also an economical solution that scales automatically as needed.
You should write data to local SSDs on the Compute Engine virtual machines. -> Incorrect. Writing data to local SSDs might provide temporary relief from the problem, but it is not a sustainable solution for buffering incoming data when you're already at the processing capacity. If the VMs are overwhelmed, this can also lead to data loss. Moreover, local SSDs are tied to the lifespan of the VMs, making them less reliable for persistent data storage.
You should write data to Cloud Memorystore, and the application should read data from the cache. -> Incorrect. Cloud Memorystore is an in-memory data storage service, mainly used for caching. While it may temporarily buffer incoming data, it is not designed as a queuing solution for decoupling producers and consumers of data. Also, using Memorystore in this manner could become expensive.
You should increase the CPU. -> Incorrect. The question specifies that you don't want to use additional virtual machines, and increasing the CPU would not actually solve the problem of preventing data loss when there is a sudden influx of data. Moreover, this could also be more expensive than using Cloud Pub/Sub.
https://cloud.google.com/pubsub/docs/create-topic-console