exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 85 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 85
Topic #: 1
[All Professional Cloud Developer Questions]

You are porting an existing Apache/MySQL/PHP application stack from a single machine to Google
Kubernetes Engine. You need to determine how to containerize the application. Your approach should follow Google-recommended best practices for availability.
What should you do?

  • A. Package each component in a separate container. Implement readiness and liveness probes.
  • B. Package the application in a single container. Use a process management tool to manage each component.
  • C. Package each component in a separate container. Use a script to orchestrate the launch of the components.
  • D. Package the application in a single container. Use a bash script as an entrypoint to the container, and then spawn each component as a background job.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
omermahgoub
Highly Voted 1 year, 3 months ago
A. Package each component in a separate container. Implement readiness and liveness probes. This is the recommended approach for containerizing an application for use on Kubernetes. By packaging each component in a separate container, you can ensure that each component is isolated and can be managed independently. You can then use readiness and liveness probes to monitor the health and availability of each component, which will help ensure the overall availability of the application.
upvoted 6 times
omermahgoub
1 year, 3 months ago
B. Package the application in a single container. Use a process management tool to manage each component. This option is not recommended because it does not follow best practices for containerization. By packaging the entire application in a single container, you would not be able to manage the individual components of the application independently, which could make it more difficult to ensure their availability.
upvoted 1 times
...
omermahgoub
1 year, 3 months ago
C. Package each component in a separate container. Use a script to orchestrate the launch of the components. This option is not recommended because it does not follow best practices for containerization. While packaging each component in a separate container is a good approach, using a script to orchestrate the launch of the components is not an effective way to ensure their availability. Instead, you should use readiness and liveness probes to monitor the health and availability of each component.
upvoted 1 times
...
omermahgoub
1 year, 3 months ago
D. Package the application in a single container. Use a bash script as an entrypoint to the container, and then spawn each component as a background job. This option is not recommended because it does not follow best practices for containerization. By packaging the entire application in a single container, you would not be able to manage the individual components of the application independently, which could make it more difficult to ensure their availability. Additionally, using a bash script to spawn each component as a background job is not an effective way to manage and monitor the availability of the components.
upvoted 1 times
...
...
__rajan__
Most Recent 7 months, 1 week ago
Selected Answer: A
A is best suited here.
upvoted 1 times
...
zellck
1 year, 4 months ago
Selected Answer: A
A is the answer. https://cloud.google.com/architecture/best-practices-for-building-containers#package_a_single_app_per_container When you start working with containers, it's a common mistake to treat them as virtual machines that can run many different things simultaneously. A container can work this way, but doing so reduces most of the advantages of the container model. For example, take a classic Apache/MySQL/PHP stack: you might be tempted to run all the components in a single container. However, the best practice is to use two or three different containers: one for Apache, one for MySQL, and potentially one for PHP if you are running PHP-FPM.
upvoted 1 times
...
TNT87
1 year, 5 months ago
the best practice is to use two or three different containers: one for Apache, one for MySQL, and potentially one for PHP if you are running PHP-FPM. Because a container is designed to have the same lifecycle as the app it hosts, each of your containers should contain only one app. When a container starts, so should the app, and when the app stops, so should the container. The following diagram shows this best practice. https://cloud.google.com/architecture/best-practices-for-building-containers#package_a_single_app_per_container Answer A
upvoted 1 times
[Removed]
1 year, 5 months ago
did you take the exam?
upvoted 1 times
TNT87
1 year, 5 months ago
Nope , not yet. im doing so soon
upvoted 2 times
...
...
...
tomato123
1 year, 8 months ago
Selected Answer: A
A is correct
upvoted 2 times
...
ParagSanyashiv
2 years, 3 months ago
Selected Answer: A
According to me "A" is the correct answer, because the best practice says "classic Apache/MySQL/PHP stack: you might be tempted to run all the components in a single container. However, the best practice is to use two or three different containers: one for Apache, one for MySQL, and potentially one for PHP if you are running PHP-FPM."
upvoted 3 times
Blueocean
2 years, 3 months ago
Agree with Option A. https://cloud.google.com/blog/products/containers-kubernetes/7-best-practices-for-building-containers
upvoted 1 times
Blueocean
2 years, 3 months ago
https://cloud.google.com/architecture/best-practices-for-building-containers
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago