WebOps Archive

Strong Consistency Models and HTTP

In a wonderfully-written article, Kyle Kingsbury explores different models of strong consistency and I thought it would be interesting to consider how to apply some of these concepts in the context of the HTTP protocol given the prevalence of web APIs in modern architectures. HTTP is an amazingly expressive protocol, especially for caching semantics, yet in my experience

Caching Fundamentals

Cache Source: Scalable system design patterns Caching improves page load times and can reduce the load on your servers and databases. In this model, the dispatcher will first lookup if the request has been made before and try to find the previous result to return, in order to save the actual execution. Databases often benefit

Bash script to get average time from logs

What if we have logs of a server like apache or syslog server and we want to get average time from timestamps of all rows. How can we do it? Basically, we need to filter timestamp (column-8) from each row and just find its average. Below is the screenshot of the problem. (click on the

Kill multiple pid with same process

Sometime back I caught up in a situation where I need to kill multiple pid invoked from same process. So, all process have same name Assume, process invoked for “vim” editor. If I have 20 “vim” process running and I want to kill all of them, what’s the best way to do it? #There are multiple ways:

TCPDUMP examples

Tcpdump is a command-line based packet capture tool like wireshark which is GUI. Capture all traffic on ethernet interface: $tcpdump –i eth0 2. Filter by host IP-address: $tcpdump host 10.0.2.15 3. Filter traffic by source and destination ip-address: TCPDUMP filter by source and destination:             $tcpdump src 10.0.2.15        

CURL command examples

CURL is a command line tool used to transfer and retrieve data in web. Let’s have a look at few of the useful options while debugging web issues. Basic syntax $CURL <Options> <hostname or ip-address> Options are optional. Hostname and IP-address can be interchanged depends upon the options we are selecting. First example is to use