Coder Social home page Coder Social logo

aio's Introduction

Work In Progress - it will not digest if consumed :E

AIO - Apigee Istio Openshift Demo

Demo Architecture

change VERSION2 in ayment v2 and also see count number in new lineee

Fault Injection

oc get pods -l app=payment -n apigee

while true; do curl http://movies-apigee.2886795268-80-kitek03.environments.katacoda.com; sleep .5; done

oc apply -f destination-rule-payment.yml -n apigee oc apply -f virtual-service-payment-503.yml -n apigee

oc get destinationrule -n apigee oc get virtualservice -n apigee oc delete destinationrule payment -n apigee oc delete virtualservice payment -n apigee

Delay

oc apply -f destination-rule-payment.yml -n apigee oc apply -f virtual-service-payment-delay.yml -n apigee

Retry

We will make pod recommendation-v2 fail 100% of the time. Get one of the pod names from your system and replace on the following command accordingly:

oc exec -it $(oc get pods|grep payment-v2|awk '{ print $1 }'|head -1) -c payment /bin/bash

You will be inside the application container of your pod recommendation-v2-2036617847-spdrb. Now execute the following command inside the recommenation-v2 pod:

$ oc exec -it $(oc get pods|grep payment-v2|awk '{ print $1 }'|head -1) -c payment /bin/bash root@payment-v2-6f9554dfcf-mkw67:/app# curl localhost:8080/misbehave payment-service-v2 - pod-ip - Following requests to '/' will return a 503

root@payment-v2-6f9554dfcf-mkw67:/app# exit exit

oc apply -f virtual-service-payment-v2_retry.yml

NOTE: You will see it work every time because Istio will retry the recommendation service and it will land on v1 only.

oc delete virtualservice payment

Timeout use 7 sec delay and then use timout virtual service to return 504 upstream request timeout after 1 sec

Simple Routing

movies v1 v2 multiple versions see round robin Canary deployment: Split traffic between v1 and v2 v1 90 v2 10 v1 10 v2 90 all to v2

Smart routing based on user-agent header (Canary Deployment) payment v1 v2 curl -A Firefox http://customer-t03.environments.katacoda.com curl -A Chrome http://custom0-80-kitek03.environments.katacoda.com

Mirroring Traffic (Dark Launch) oc get pods -l app=recommendation -n tutorial You should have 2 pods for recommendation based on the command bellow:

oc logs -f $(oc get pods|grep payment-v2|awk '{ print $1 }') -c payment
Hit CTRL+C when you are satisfied.

Random Loadbalancing

oc scale --replicas=2 deployment/payment-v2 oc scale deployment recommendation-v2 --replicas=2 -n tutorial oc scale deployment recommendation-v2 --replicas=3 -n tutorial oc get pods -w while true; do curl http://moviesssssssnvironments.katacoda.com; sleep .5; done

The results should follow a fairly normal round-robin distribution pattern where v2 receives the request 3 times more than v1

Scale back to a single replica of the recommendation-v2 deployment:

oc scale --replicas=1 deployment/recommendation-v2

On Terminal 2, you will see requests being round-robin balanced between v1 and v2.

aio's People

Contributors

sidd-harth avatar

Watchers

James Cloos 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.