Skip to content

Microservice Design and Architecture :Reliable Google Cloud Infrastructure: Design and Process (Preparing for Google Cloud Certification: Cloud Architect Professional Certificate) Answers 2025

Question 1

You’re building a RESTful microservice. Which would be a valid data format for returning data to the client?

❌ JSON
🟩 All options are correct.
❌ HTML
❌ XML

Explanation:

REST APIs commonly return JSON, but XML and HTML are also valid depending on the use case. Therefore, all options are valid formats.


Question 2

Client sends invalid data. What should your service return?

❌ 200
❌ 500
🟩 400
❌ XML exception

Explanation:

HTTP 400 Bad Request indicates the client sent invalid or malformed data.
500 is for server errors, not client mistakes.


Question 3

Which violates 12-factor app best practices?

🟩 Store configuration information in your source repository for easy versioning.
❌ Keep dev/test/prod similar
❌ Explicitly declare dependencies
❌ Treat logs as event streams

Explanation:

12-factor apps require config to be stored in environment variables, not in source control.


Question 4

Session state moved to DB β†’ slow performance. Best fix?

❌ Move sessions back to servers with sticky sessions
🟩 Use a caching service like Memorystore for Redis.
❌ Put all servers in same zone
❌ Increase DB CPUs

Explanation:

Session data is read frequently β†’ caching in Redis drastically improves performance.
Putting state back on servers breaks scalability and resilience.


🧾 Summary Table

Q# Correct Answer Key Concept
1 All options are correct REST APIs can return JSON, XML, HTML
2 400 error Invalid client data β†’ Bad Request
3 Storing config in source repo Violates 12-factor config principle
4 Use Redis cache Best practice for fast session retrieval