https://github.com/khulnasoft/learn-khulnasoft
https://github.com/khulnasoft/learn-khulnasoft
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/khulnasoft/learn-khulnasoft
- Owner: khulnasoft
- License: apache-2.0
- Created: 2024-03-20T20:01:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-19T00:29:55.000Z (10 months ago)
- Last Synced: 2025-02-01T02:16:03.645Z (8 months ago)
- Language: Go
- Size: 486 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
![]()


[](https://hub.docker.com/r/khulnasoft/learn-khulnasoft)
[](https://goreportcard.com/report/github.com/khulnasoft/learn-khulnasoft)
[](https://github.com/issues?utf8=β&q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Akhulnasoft+label%3A%22help+wanted%22+")
[](https://khulnasoft.com)
[](https://twitter.com/intent/follow?screen_name=meshplayio)
[](http://slack.khulnasoft.com)
[](https://bestpractices.coreinfrastructure.org/projects/3564)# Learn KhulnaSoft (learn to service mesh)
The Learn KhulnaSoft sample application is to be available for use across all service meshes that Meshplay supports and is to used as:
- a learning device (for [service mesh workshops](https://khulnasoft.com/workshops))
- for [Service Mesh Interface conformance](https://docs.google.com/document/d/1HL8Sk7NSLLj-9PRqoHYVIGyU6fZxUQFotrxbmfFtjwc/edit#)## Application Architecture
The Learn KhulnaSoft application includes three services: `app-a`, `app-b`, and `app-c`. Though they are different services, they are defined using the same app (source code in ./service). Each service is listening on port `9091/tcp`.### Service
The following are the routes defined by the `service` app and their functionality.
#### POST /call
This route makes the service make requests to another service. Metrics are collected for this route. sample usage given below:
```shell
# Command
curl --location --request POST 'http://service-a:9091/call' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "http://service-b:9091/call",
"body": "{\r\n\"url\": \"http:\/\/service-c:9091\/echo\",\r\n\"body\": \"\",\r\n\"method\": \"GET\"\r\n}",
"method": "POST",
"headers": {
"h1":"v1"
}
}'# No Output
GET /echo HTTP/1.1
Host: service-c:9091
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip
Servicename: Service-B
```In the above example, we are making a post request to `service-a` with the body:
```json
{
"url": "http://service-b:9091/call",
"body": "{\r\n\"url\": \"http:\/\/service-c:9091\/echo\",\r\n\"body\": \"\",\r\n\"method\": \"GET\"\r\n}",
"method": "POST",
"headers": {
"h1":"v1"
}
}
```
This will make `service-a` to make a `POST` request to `http://service-b:9091/call` with the headers specified above, and the body:
```json
{
"url": "http://service-c:9091/echo",
"body":"",
"method": "GET"
}
```
This inturn will make `service-b` to make a `GET` request to `http://service-c:9091/echo`.#### GET /metrics
Gets the metrics from `service-a`
```shell
# Command
curl --location --request GET 'http://service-b:9091/metrics'
# Output
{
"ReqReceived": [
"Service-A"
],
"RespSucceeded": [
{
"URL": "http://service-c:9091/echo",
"Method": "GET",
"Headers": null
}
],
"RespFailed": []
}
```
* In ReqReceived we see list of requests `service-b` received and from whom it received. Here we see `service-A`. Actually each of the service sets a header `ServiceName` which is read by the service to determine the sender.
* As `service-b` made a request to `service-c` and the request succeeded, we can see the details in the list of successful responses (RespSucceeded).#### DELETE /metrics
Clears the counters in `service`
```shell
# Command
curl --location --request DELETE 'http://34.68.35.174:9091/metrics'
# No Output
```> Note: metrics are collected only for `/call` and `/echo`.
# Service Mesh Interface (SMI) Conformance
The `learn-khulnasoft` application serves as a sample application to validate the conformance of any service mesh with the SMI specifications. To verify SMI conformance, run Meshplay and the Meshplay adapter for the specific service mesh you wish to test. Invoke the suite of SMI conformance tests on the specific service mesh you would like to validate.## Invoking conformance tests
**As a Service Mesh user**
Meshplay allows you to schedule tests and invoke them programmatically. Meshplay will store these test results and allow you to retrieve them later.**As a Service Mesh maker**
Meshplay guarantees provenance of these tests and facilitates the public publicing of this suite of tests results into a versioned, public matrix of conformance status (consisting of both supported capabilities and test compliance).
If youβre using Learn KhulnaSoft or if you like the project, please β star this repository to show your support! π€©
Community and Contributing
Our projects are community-built and welcome collaboration. π Be sure to see the KhulnaSoft Community Welcome Guide for a tour of resources available to you and jump into our Slack! Contributors are expected to adhere to the CNCF Code of Conduct.
βοΈ Join any or all of the weekly meetings on the community calendar.
βοΈ Watch community meeting recordings.
βοΈ Access the community drive.
βοΈ Discuss in the Community Forum.
Not sure where to start? Grab an open issue with the help-wanted label.## About KhulnaSoft
[KhulnaSoft](https://khulnasoft.com)'s cloud native application and infrastructure management software enables organizations to expect more from their infrastructure. We embrace developer-defined infrastructure. We empower engineer to change how they write applications, support operators in rethinking how they run modern infrastructure and enable product owners to regain full control over their product portfolio.
**License**
This repository and site are available as open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).