Coder Social home page Coder Social logo

go_gke_pipeline's Introduction

Go K8s Tracking Pipeline

This repo is setup to play about with running Golang base services within a kubernetes environment.

One of the main objects, is to be able to effectively track a request as it goes through different services within the k8s cluster.

Tracking is useful for keeping processing requests in a non blocking format, and allow to see the latency of the request at each step of its journey, and the overall request time.

Infrastructure

  • Terraform -> Kubernetes
  • Helm -> Kubernets resources
  • Vault -> Secrets

CI/CD

  • Github CI

Pipeline:

  • Lambda style applications that enrich data as it flows through the system
  • Each app records heart beat of request as it passes through

Monitoring:

Request flow:

  • Client request
  • API gateway
    • Validates request
      • Failing requests return an error to the client
    • Determine which service should handle query
    • Message is placed sent to a given PubSub topic
  • Secondary service
    • Picks up message from PubSub subscription
    • Processes request
    • Publishes response back onto the PubSub, for the API gateway to consume
  • API gateway
    • Watches for responses
    • Gets response
      • Either directly from the PubSub message or Redis
    • Response is sent back to the client

Services

API Gateway

  • Create tracking span, and add it to the client request
  • Create datastore record
  • Pass client request to the enrichment API
  • Wait for record to be finalised
    • Redirect loopg
  • Return response to client

Setup

This project is setup with Docker (docker-compose), and Makefiles, for ease of use.

Simply make sure you have docker-compose installed locally.

Minikube (Optional)

This repo not only contains the Golang source, but also comes with helm chart for installing the application on kubernetes.

To run application locally within a kubernetes environment, you can install minikube.

Local development

To get the application running locally, simply run:

make docker.run

Packages

[Logrus](golang logrus vs zerolog) - Logging Open Telemetry - Metrics and tracing

go_gke_pipeline's People

Contributors

mjmcconnell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.