New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample App: Adding the db service #5909
Conversation
✅ Deploy Preview for knative ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Closed as this PR is a guidance for the community contributor's PR. #5913 |
You might wonder, "Why not leverage Knative Serving to dynamically scale the database service in response to traffic demands?" We'll delve into the optimal scenarios for employing Knative Serving and when it's advantageous for our database service. | ||
|
||
### BookReviews Table | ||
## What Knative features will we learn about? | ||
- Appropriate Use Cases for Knative Service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the sentence and the point list is out of context and eventually contextualized below in Why did we choose to deploy our PostgreSQL database using a StatefulSet instead of a Knative Service?
.
I think the section below is enough
Note box: However, Knative Service supports Volumes and Persistent Volumes, which can be used to store data. You can read more [here](https://knative.dev/docs/serving/services/storage/) about how to use Volumes and Persistent Volumes with Knative Services specially for your use case. | ||
|
||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the way to format a "note box"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it is a note to myself. I will edit it when we are ready to render the tutorial to pages. The issue has been created to track this #5938
|
||
You can read more about the best use cases for Knative Service [here](https://knative.dev/docs/serving/samples/)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the samples page describes the point here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no page that describes the usage for the sample usage of Knative Service. Adding the new page or edit the current existing page to list the few sample usage is my thought:
-
E-commerce websites during sales events: traffic can spike a lot during sales events or holiday seasons. Knative Service can automatically scale the backend services up or down based on demand, ensuring that the website remains working.
-
Real-time analytics and monitoring: In IoT or data analytics applications, Knative can manage services that process data streams in real time. For example, a company monitoring environmental sensors across a city could use Knative to scale up data processing services as the volume of sensor data spikes.
-
ML model serving: serving different models based on user requirements or experimenting with A/B testing of models. It allows for the deployment of many revisions of a model and dynamically scales these services based on the request load!
-
Microservices and APIs: for those who use microservices architecture, Knative service provides a way to deploy and manage serverless APIs that scale automatically with usage. This is particularly useful for APIs with different traffic patterns
plz correct me if any of these are not accurate or may not be the best use case of knative service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, those are accurate, however, my point is that we can have a dedicated page for this vs being part of something unrelated, in this page, we can stay concise and link to the dedicated page on "when to use ksvc vs when not to use ksvc"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we don't have such content / page, we can add it later as necessary
By following this guide, you have successfully deployed a PostgreSQL server on a Kubernetes cluster, set up persistent storage, and initialized your database using a Kubernetes job. Congratulations! Your bookstore now has the database service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, I think this needs a link to next section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! In all parts of the tutorial, it will have the link navigate to the next section at the bottom to make sure the reading experience is good!
code-samples/eventing/bookstore-sample-app/db-service/sample.sql
Outdated
Show resolved
Hide resolved
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can follow up on some comments later
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Leo6Leo, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #5891
Proposed Changes