Skip to content
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

A new service description format in generator module #6

Closed
salehsedghpour opened this issue Jan 26, 2022 · 3 comments · Fixed by #21
Closed

A new service description format in generator module #6

salehsedghpour opened this issue Jan 26, 2022 · 3 comments · Fixed by #21

Comments

@salehsedghpour
Copy link
Collaborator

Currently, the representation of chains and clusters is somehow complex/hard/time consuming. Unified, prettier and simpler

@salehsedghpour
Copy link
Collaborator Author

salehsedghpour commented Jan 31, 2022

The initial idea for a new service description format could be something like:

{
  "latencies": [
    {
      "src" : "cluster_1",
      "dest": "cluster_2",
      "latency": 0.002
    }
  ],
  "clusters": [
    {
      "name": "cluster_1",
      "namespace": "ns_1",
      "services": [
        {
          "name": "service_1",
          "node": "node-1",
          "resources": {
            "limits": {
              "memory": 1024,
              "cpu": 1000
            },
            "requests": {
              "memory": 512,
              "cpu": 500
            }
          },
          "endpoints": [
            {
              "name": "/end_1",
              "protocol": "http",
              "cpu_consumption": 0.003,
              "network_consumption": 0.002,
              "memory_consumption": 0.003,
              "calledservices": [
                {
                  "cluster": "cluster_1",
                  "service": "service_2",
                  "endpoint": "/end_2",
                  "protocol": "grpc",
                  "traffic_ratio": 1,
                  "requests": "asynchronous"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

It could help to solve #2 , #3, #4, #5, #8, #9, #12, #13, #14, #16, #18.
@alekodu do you have any comment on this?

@salehsedghpour
Copy link
Collaborator Author

As we discussed, we decided to:

  • split the services for name services simply by having a list of dictionaries for each namespace.
  • Add a random option for both cluster or namespace placement
  • protocol could be deleted for each called service
  • traffic ratio should be renamed to traffic forward ratio.

Also, we decided to wait for merging this PR until the services are ready.
Another point is to fork the repo on our own account to make us able to use every possible feature of Github.

@salehsedghpour
Copy link
Collaborator Author

Based on our discussion and to support everything we needed in the previous comment, we decided to go for:

{
  "latencies": [
    {
      "src" : "cluster_1",
      "dest": "cluster_2",
      "latency": 0.002
    }
  ],
  "services": [
    {
      "name": "service_1",
      "clusters": [
        {
          "cluster": "cluster_1", // Random
          "namespace": "ns_1", // Random
          "node": "node_1"// Random
        }
      ],
      "resources": {
        "limits": {
          "memory": "1024",
          "cpu": "1000"
        },
        "requests": {
          "memory": "512",
          "cpu": "500"
        }
      },
      "endpoints": [
        {
          "name": "/end_1",
          "protocol": "http",
          "cpu_consumption": 0.003,
          "network_consumption": 0.002,
          "memory_consumption": 0.003,
          "calledservices": [
            {
              "cluster": "cluster_1",
              "service": "service_2",
              "endpoint": "/end_2",
              "traffic_forward_ratio": 1,
              "requests": "asynchronous"
            }
          ]
        }
      ]
    }
  ]
}

salehsedghpour added a commit to salehsedghpour/cloud-native-app-simulator that referenced this issue Feb 23, 2022
salehsedghpour added a commit to salehsedghpour/cloud-native-app-simulator that referenced this issue Feb 23, 2022
@alekodu alekodu changed the title A new service description format A new service description format in generator module Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant