Skip to content
zkybase devops projects and notes

Field note / May 14, 2012

Moved Kite from Google Code to GitHub

By Willie Wheeler2 min readKite, News

I wrote a small library called Kite a couple of years back, based on Michael Nygard’s outstanding book. Currently it has a circuit breaker and concurrency throttle. There are several others I’d like to add. [Update: I've since added a rate limiting throttle.] It’s something I’ll get back to once I finish the book.

So today I moved Kite from Google Code to GitHub. Check out my.

Kite includes a tiny sample app so you can see how it works. But it’s pretty easy to describe just in a blog post. Kite allows you to harden your app in a couple of easy steps. First:




    
    
    
    
    
    
    
    
    

And second, here’s the message service itself:

import org.zkybase.kite.GuardedBy;

... other imports ...

@Service
@Transactional
public class MessageService {

    @GuardedBy({ "messageServiceThrottle", "messageServiceBreaker" })
    public Message getMotd() { ... }

    @GuardedBy({ "messageServiceThrottle", "messageServiceBreaker" })
    public List getImportantMessages() { ... }
}

After this, your service methods are protected by a circuit breaker that trips if there are three consecutive errors (“trip” here means that it disables the call), and a concurrency throttle that throws an exception if there are 50 concurrent requests. Such components protect both the backend service and also clients that want to avoid queuing on services that are experiencing performance degradation.

For more information on how the circuit breaker works, see.

I’ll do a more careful writeup later, but and send any questions or feedback my way.

Share this entryXLinkedInFacebookEmail

Reference shelf