https://avatars.githubusercontent.com/u/334129

Protecting Services With Kong Gateway Rate Limiting

Protecting Services With Kong Gateway Rate Limiting The Kong Gateway Rate Limiting plugin is one of our most popular traffic control add-ons. You can configure the plugin with a policy for what constitutes “similar requests” (requests coming from the same IP address, for example), and you can set your limits (limit to 10 requests per minute, for example). This tutorial will walk through how simple it is to enable rate limiting in your Kong Gateway.

How to Design a Scalable Rate Limiting Algorithm

What is rate limiting? Rate limiting protects your APIs from inadvertent or malicious overuse by limiting how often each user can call the API. Without rate limiting, each user may make a request as often as they like, leading to “spikes” of requests that starve other consumers. Once enabled, rate limiting can only perform a fixed number of requests per second. A rate limiting algorithm helps automate the process. In the example chart, you can see how rate limiting blocks requests over time.

Practical Tips on Writing an Effective Web Crawler

A web crawler is a hard-working bot to gather information or index the pages on the Internet. It starts at some seeds URLs and finds every hyperlink on each page, and then crawler will visit those hyperlinks recursively. 1. Choose an Ideal Programming Language Here is a ranking of popular languages on developing web crawlers (based on result numbers of relative repositories host on Github on February, 2013): Python or Ruby probably is a wise choice, the mainly speed limit of web crawler is network latency not CPU, so choose Python or Ruby as a language to develop a web crawler will make life easier.

Snippets for Racket Language

In the CS 5010 - Programming Design Paradigm course, we need write tons of documents, repeat ourselves again and again, so I develop this snippet to save us time. If you using vim, you need install snipMate first, You can get the snippet on my Github: https://github.com/guanlan/snippet-for-racket download the snippet file and put in ~/.vim/snippets/ You can watch demo here This snippets is also available on sublime, you can read tutorial here.

Rethink in Functional Languages

After about 3 months to learn and using Racket (a programming language in Lisp/Scheme family), I learning lots of concepts of programming. The most important thing in FL(functional languages) is: "All data are immutable. All functions are pure." Immutable Data Immutable data cannot be modified after being created. It has many advantages: Inherently Thread safety Parallel programming is the nightmare of some programers, because different threads simultaneously access the same object can cause unexpected problem, such like a race conditions.

How to use Python like Lisp

Lisp has some very effective way to get jobs done, this article give you a direct way to use Python like Lisp.``` cons = lambda el, lst: (el, lst) 1 mklist = lambda *args: reduce(lambda lst, el: cons(el, lst), reversed(args), None) car = lambda lst: lst[0] if lst else lst 1 cdr = lambda lst: lst[1] if lst else lst nth = lambda n, lst: nth(n-1, cdr(lst)) if n ]]> 0 else car(lst)