RSS Feed Subscribe to RSS Feed

 

Post Production Debugging

Monitoring and Observing Your App Post Release

Pre-release tests are essential, but the ability to debug, monitor and observe your application suite post-release is what allows you to detect, and quickly fix, the production problems that will inevitably rise.

(more…)

Tags: , , , , , , , , ,

AWS S3 SLAs

According to the AWS S3 docs, S3 is designed for 99.99% availability over a given year, but their SLA compensates you when availability drops below 99.9% monthly uptime. That is, you will receive some level of refund (up to 25%) if there is more than 43 minutes of downtime per month.

(more…)

Tags: , , ,

JWTs

This post is a quick and dirty introduction to JWTs. Honestly, there are better resources out there to learn about JWTs. See the references section below. These are just some of my own, fairly hastily written, notes…

(more…)

Tags: , ,

Proxies: Forward versus reverse proxy

What is the difference between a forward and reverse proxy?

TLDR;

  • A forward proxy is a client proxy. It manages outgoing traffic. For example, providing content restriction or facilitating anonymity.
  • A reverse proxy is a server proxy. It manages incoming traffic, providing benefits such as load balancing and rate throttling.
  • Both forward and reverse proxies can provide caching benefits.

 (Source)

(more…)

Tags: , , ,

Maven (mvn) build hanging

I recently had a problem with a maven build hanging when doing a ‘mvn install’.

I found some pointers in this post, and posting here in a modified form: http://forum.spring.io/forum/spring-projects/roo/121725-what-diagnostic-action-to-take-when-maven-hangs

1. In the hanging shell, hit CTRL-Z – this will suspend the program and give you a pid. An alternative way to get the pid is to do a “ps -ef” and search for you mvn command e.g. “clean install”
2. type bg [ENTER] – this will send the program to the background
3. Do a kill -3 of the process – it will dump a large amount of text – make sure your command line terminal history window is long enough to capture it all – will be several thousand lines of text
(alternative to #3 – you can try jstack with the pid, it is a Java stack trace generator)
4. You can see what threads are waiting on other threads from there (maybe, sometimes it’s a tight CPU loop)

Tags: ,

URL Encoding

URL encoding, also known as percent encoding, takes certain “reserved” characters and standardizes (or canonicalizes) them.

Why? This is normally done when transmitting data in html forms. For example, the # character has a special purpose in html (as an html anchor) and so is converted to make it clear that it is part of that data, not part of the html document where it is to be displayed.

Another (related) use is for prevention of XSS attacks. If your web page allows a user to enter text (for example, a comments box on a blog), it would be very easy for a motivated user to enter malicious text that will be interpreted as a script.

(more…)

Tags: , , , ,

Copying keys to a new laptop

If you use GPG (which I have written about before) and start using a new laptop, you will need to copy your keys over.

While it is possible to copy just your personal key, I prefer to also copy other people’s (public) keys too, and my entire trust database. To do this is fairly simple…

(more…)

Tags: , , , ,

Git revert a merged branch

The article discusses how to revert changes that have already been pushed to your remote git branch, particularly reverting the changes that come from a branch merge.

(more…)

Tags: , , , ,

Don’t use “kill -9”

In the past, any time I wanted to stop an errant process on unix, I just used “kill -9”. By default. Without thinking about it much.

Then a colleague commented to me that you should never use kill -9. It terminates the process with no chance to shutdown in an orderly manner, and so can leave things in a bad state, such as corrupting files. “But what else am I supposed to do!?” I naively asked.

There are of course many other options for the kill command (see links below), but here are some alternatives you can try, in the order you may want to try them.

(more…)

Tags: , , ,

Creating a Maven multi module project

There is no easy way, or simple archetype, to create a maven multi module project. The approach below is the best way I’ve found so far.

(more…)

Tags: , ,