Create blueprints for observability endpoints #9

Open
opened 2025-10-08 00:31:06 -03:00 by dunossauro · 1 comment
Member

Reading through @gutocarvalho's notes, he highlights some important endpoints for observability:

  • /health
  • /readiness
  • /liveness

I think it would be beneficial to go ahead and create these blueprints, define what should be returned by each endpoint, and ensure they are properly tested and functioning from the start. This will help us ensure the application is easy to monitor and troubleshoot as we move forward.

Reading through @gutocarvalho's [notes](https://notes.bolha.tools/zukjODRTREWVBIca9d2vAQ#2-Observabilidade), he highlights some important endpoints for observability: - `/health` - `/readiness` - `/liveness` I think it would be beneficial to go ahead and create these blueprints, define what should be returned by each endpoint, and ensure they are properly tested and functioning from the start. This will help us ensure the application is easy to monitor and troubleshoot as we move forward.
Owner

These endpoints will be helpful to configure the app inside kubernetes.

apiVersion: v1
kind: Pod
metadata:
  name: my-app-pod
spec:
  containers:
  - name: my-app-container
    image: my-app-image:latest
    ports:
    - containerPort: 8080

    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
      initialDelaySeconds: 60
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 3

    readinessProbe:
      httpGet:
        path: /ready
        port: 8080
      periodSeconds: 5
      timeoutSeconds: 3
      failureThreshold: 1

Liveness Probe determines if the application within the container is still running and healthy. If it fails, Kubernetes restarts the container.

Readness determines if the application is ready to accept incoming traffic. If it fails, the Pod is removed from the Service's endpoints, preventing traffic from being routed to it.

These endpoints will be helpful to configure the app inside kubernetes. ```yaml apiVersion: v1 kind: Pod metadata: name: my-app-pod spec: containers: - name: my-app-container image: my-app-image:latest ports: - containerPort: 8080 livenessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 60 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /ready port: 8080 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 1 ``` Liveness Probe determines if the application within the container is still running and healthy. If it fails, Kubernetes restarts the container. Readness determines if the application is ready to accept incoming traffic. If it fails, the Pod is removed from the Service's endpoints, preventing traffic from being routed to it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: vitae/backend-vitae#9
No description provided.