Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Accelerate Microservice Debugging with Telepresence

Accelerate Microservice Debugging with Telepresence

Debugging your microservice-based application becomes difficult when you can no longer run everything locally due to resource requirements. Moving to the cloud for testing is a no-brainer, but how do you synchronize your local changes against your remote Kubernetes environment?

Following the usual container build-push-test cycle makes your inner development loop slower because you’d have to wait for minutes, sometimes hours, before seeing the impact of your code changes, and this dramatically reduces the number of iterations you can perform, the features you can ship to your end-users and negatively impacts the developer experience.

Telepresence adopts the "local-to-remote" debugging approach which bridges the gap between remote Kubernetes clusters and local development, thereby offering you the best of both worlds; the ability to use your local tools for debugging and the ability to access all the dependencies in the remote Kubernetes cluster. It enables K8s development teams to improve their developer experience, accelerate their inner dev loop, and catch bugs before production.

In this talk, you'll learn how to accelerate the debugging process of your microservice-based applications using the open source tool Telepresence.

Edidiong Asikpo

September 05, 2023
Tweet

More Decks by Edidiong Asikpo

Other Decks in Technology

Transcript

  1. Hello! My name is Edidiong Asikpo A Senior Developer Advocate

    at Ambassador Labs, CNCF Ambassador and Technical Content Creator who loves building, writing and sharing knowledge. Social media - @didicodes
  2. Kubernetes & containerization has solved many challenges businesses face •

    Flexibility • Scaling • Reliability of the release of new versions
  3. What’s developer experience? Developer experience is the workflow a developer

    uses to develop, test, deploy, and release software. • Inner development loop • Outer development loop Typically, this experience consists of the:
  4. Cloud native technologies have altered the developer experience in two

    ways: 1. Extra steps in the inner dev loop 2. Developers involvement with outer dev loop This comes with its benefits & disadvantages!
  5. • Frontend developers have to wait for previews of backend

    changes on a shared dev environment or rely on mocks when coding their application locally. • Backend developers have to wait for CI/CD to build & deploy their app to a target environment to verify that their code works correctly. • This slows releases into production overall thereby impacting the business and end users at large. A slow inner dev loop impacts everyone!
  6. Local Development THE GOOD Fast dev loop Low cost THE

    BAD High maintenance Hot workstations
  7. What is Telepresence? • A tool that simplifies how teams

    test and debug on Kubernetes • Connects your local machine to a cluster via a two-way proxying mechanism ▪ Access cluster’s services as if they are running locally ▪ Reroute cluster’s traffic to your local service
  8. Global All requests to the service are intercepted and forwarded

    Personal Only requests with the HTTP header are intercepted and forwarded
  9. Before Telepresence 😔 A development environment quite different from their

    production environment. With Telepresence 🎉 A development environment that resembles production very well. • “We can develop against the same database running in the exact same configuration.” • “When we develop something, we can be sure it’s 100% compatible with our production environment.” ▪ No surprising missing environment variable ▪ Incompatibility between production and mocked database ▪ Catch bugs before shipping to production
  10. Before Telepresence 😔 With Telepresence 🎉 • The need to

    constantly build and deploy test images was removed • Increase in the speed & fidelity of their inner dev loop • They had to go through the build/push/test cycle before seeing the impact of their code changes • A slow inner dev loop
  11. Without Telepresence 😔 A not so great developer experience With

    Telepresence 🎉 An improved developer experience • Couldn’t utilize the benefits of both the “local” & “remote” K8s development methods • Code -> Build container -> Push to registry → Deploy & wait -> Test • Code -> Intercept ->Test • They got the best of both worlds (local and remote Kubernetes development) • The operational & resource burden of running all their microservices locally was removed • They bore the operational & resource burden of running all their microservices locally
  12. Wrapping up 🎉 • Kubernetes & containerization has solved many

    challenges that business face today when it comes to flexibility, scaling & reliability of the release of new versions. • But it also posed additional challenges for developers by introducing operational complexity into their development workflow. • To solve this, we need to bridge the gap between clusters and local dev environment • This is exactly what Telepresence does! It gives you the best of both worlds. • Try it out and/or contribute to this CNCF project.