Go is a great language to write HTTP servers in, often using just
post shows a few examples of Go servers that serve static
content. The examples range from a very simple purely static file
server to a fairly complete web application bundled into a single Go
In this article, we will identify the optimal format for structuring
our logs that is easy for humans and machines to parse and
understand. Next, we will highlight the key info to log in addition
to a proposal of data structure. Finally we will try to provide some
important notes to keep in mind for your own projects.
A signal is an event that Linux systems generate in response to some
condition. Signals can be sent by the kernel to a process, by a
process to another process, or a process to itself. Upon receipt of
a signal, a process may take action.
Signals are a core part of Unix-like operating environments and have
existed since more or less the dawn of time. They are the plumbing
for many of the core components of the operating system—core
dumping, process life cycle management, etc.—and in general, they've
held up pretty well in the fifty or so years that we have been using
them. As such, when somebody suggests that using them for
interprocess communication (IPC) is potentially dangerous, one might
think these are the ramblings of someone desperate to invent the
wheel. However, this article is intended to demonstrate cases where
signals have been the cause of production issues and offer some
potential mitigations and alternatives.
One of the most useful, but often misunderstood and misconfigured,
features of NGINX is rate limiting. It allows you to limit the
amount of HTTP requests a user can make in a given period of time. A
request can be as simple as a GET request for the homepage of a
website or a POST request on a log‑in form.
Rate limiting can be used for security purposes, for example to slow
down brute‑force password‑guessing attacks. It can help protect
by limiting the incoming request rate to a value typical for real
users, and (with logging) identify the targeted URLs. More
generally, it is used to protect upstream application servers from
being overwhelmed by too many user requests at the same time.
In this blog we will cover the basics of rate limiting with NGINX as
well as more advanced configurations. Rate limiting works the same
way in NGINX Plus.
The FreeBSD operating system contains
innumerable powerful features. One of these features is bhyve, its
native type 2 (OS-level) hypervisor, which can host virtual machines
running multiple different OSes, including Linux.
This post will walk you through creating a Linux virtual machine on
FreeBSD using the CBSD tool, which greatly
simplifies creating and managing bhyve VMs.
A colleague used the patch-branch
of merging a single commit to another branch, but found that the
subsequent merge of the complete branch produced the wrong
results. They asked me to investigate what went wrong.
I hold the opinion that state machines are often misunderstood and
And that's why I wrote this. The goal of this list of facts is not
to teach you what state machines are or how to use them; there are
plenty of other resources for that. Rather, the goal here is to
motivate their usage and to highlight things about them that are
frequently overlooked, but nonetheless relevant.
I recently learnt that mypy has a compiler called
mypyc. The compiler uses standard
python type hints to generate c extensions automatically from python
code. I found the idea very interesting as I have a library
(Lagom - a dependency
injection container) which is fairly extensively annotated with
types. I liked the idea of getting a performance boost without
having to rewrite any code or having to deal with multiple
languages. This blogpost is intended to be a short overview of what
I did, the problems I ran into and the workflow I ended up with.
This is a from-scratch explanation of private information retrieval
built using homomorphic encryption. I try to assume only a general
math / computer science background. To simplify things, my
explanations may not always match academic definitions.
LISTEN / NOTIFY is a feature that enables users to listen to what
goes on in the database. It is one of the oldest
in PostgreSQL and is still widely used. The main question is: What
is the purpose of the asynchronous query interface (LISTEN / NOTIFY), and what is it good for? The basic idea is to avoid
Here are some of the ways you can discover your data processing jobs
are too slow:
Jobs start getting killed when they hit timeouts.
Customers start complaining about slow or failed jobs.
Your cloud computing bill is twice what it was last month.
While these notification mechanisms do work, it’s probably best not
to rely on them. Life is easier when jobs finish successfully,
customers are happy, and you have plenty of money left over in your
That means you want to identify unexpected slowness or high memory
usage before the situation get that bad. The sooner you can
identify performance problems, the sooner you can fix them.
So how can you identify inefficient tasks in your data pipeline or
workflow? Let’s find out!
I often find async Rust to be misunderstood. Conversations around
"why async" often focus on performance
a topic which is highly dependent on workloads, and results with
people wholly talking past each other. While performance is not a
bad reason to choose async Rust, we often we only notice
performance when we experience a lack of it. So I want to instead on
which features async Rust provides which aren't present in
non-async Rust. Though we'll talk a bit about performance too at the
end of this post.