Happy Goat for Life! Chris Phillips' Blog - API, Integration and Governance SME and Enthusiast
API CONNECT

Setting Payload limits to protect your apis in API Connect

In API Connect a parsing policy can be used to protect your apis to ensure that large files are not malicious or accidentally clogging up system, by default the max size is 4MB. However clients frequently want to support files larger then the default size, this is not something I recommend (I will make a future post about).

This post will show the steps to increase or decrease the document size limit.


OPENSHIFT

Debugging ICSP (Image Content Source Policies)

In Openshift 4 ICSPs (Image Content Source Policies) are used to redirect crio in the worker nodes to retrieve images from a location that is different then the name of the image.


API CONNECT

Rate Limiting an API that does not take a Consumer ID as a parameter.

Applying a rate limit to an API is essential to protecting downstream systems. Usually this is done OOTB with plans in API Connect. However if the API does not require a Client ID to be passed in this system will not work. Luckily API Connect provides a facility to rate limit directly on the canvas.


API CONNECT

Circuit Breaker in API Connect

A Circuit breaker pattern is becoming a common pattern for remote calls today. The purpose of the circuit breaker is to detect when a series of errors are returned and block traffic for a time period, thus giving the backend system time to recover.


OPENSHIFT

Waiting for a pod to start

I often write shell scripts to do kick off tasks, wipe databases etc etc…. Im lazy and it means I can kick this off then walk the dog. I recently came across the oc wait command. This allows you to run a command that returns either when a timeout is hit or a kube object goes into a desired state. The default timeout is 30s

oc wait --for=condition=Ready=true po minimum-a7s-storage-data-0 --timeout=300s

The above command waits for the pod named minimum-a7s-storage-data-0 to be in a ready state or until five minutes have passed.


DAY2 OPERTATIONS

SLA Budgetting - The 99.9999% Fallacy

Often project owners state that their application needs an availability of 99.97%. Though I will be referring to API Connect in this article it is applicable to any application.

99.97% SLA matches on to 2h37m47s of total outage a year.

Though this is useful it doesn’t provide quite enough information.


API CONNECT

Tuning API Connect Analytics - CORRECTION!

8 months ago I wrote up on how to tune Analytics. There was lots of bad suggestions in that article and this article is here to correct the original.


OPENSHIFT

Run CronJob immediately

One of my most common google strings is how to run a cronjob in k8s immediately.

kubectl create job --from=cronjob/<CronJob Name> <JobName>

Use the above command just change the cronjob name and the jobname


OPENSHIFT

Pod Disruption Budget

If you drain a node in kubernetes the pods will be shut down all at once. This is not suitable if there is a quorum requirement as it will cause the application to have an outage. To get around this configure a Pod Disruption Budget.


Subscribe