background preloader

Web server development

Facebook Twitter

Optimizing web servers for high throughput and low latency. This is an expanded version of my talk at NginxConf 2017 on September 6, 2017.

Optimizing web servers for high throughput and low latency

As an SRE on the Dropbox Traffic Team, I’m responsible for our Edge network: its reliability, performance, and efficiency. The Dropbox edge network is an nginx-based proxy tier designed to handle both latency-sensitive metadata transactions and high-throughput data transfers. In a system that is handling tens of gigabits per second while simultaneously processing tens of thousands latency-sensitive transactions, there are efficiency/performance optimizations throughout the proxy stack, from drivers and interrupts, through TCP/IP and kernel, to library, and application level tunings.

In this post we’ll be discussing lots of ways to tune web servers and proxies. Please do not cargo-cult them. This is not a Linux performance post, even though I will make lots of references to bcc tools, eBPF, and perf, this is by no means the comprehensive guide to using performance profiling tools. Memory Hard Drive.

Https

Injection de headers dans la fonction mail() de PHP. Les failles sur le net permettant l'envoi d'un mail anonyme peuvent souvent servir à un hacker, ou pour une arnaque quelconque.

Injection de headers dans la fonction mail() de PHP

En effet, quand on envois un mail en PHP, le destinataire reçoit un mail dont l'ip de l'expéditeur est celui du site depuis lequel la fonction mail() a été appelée. Le site fait donc usage de proxy SMTP. Dans ces cas-là, le problème vient du fait que l'utilisateur peut choisir le sujet du mail, son message, l'expediteur et le destinataire. Runtime.exec() pour les nuls et ProcessBuilder. Il vous est déjà sûrement arrivé, un jour, de vouloir exécuter un application externe à partir de votre programme Java.

Runtime.exec() pour les nuls et ProcessBuilder

Et si c’est le cas, vous avez très probablement eu du mal à faire fonctionner votre programme correctement, celui-ci semblant se bloquer et ne plus rien afficher. Dans ce petit article, je vais vous expliquer rapidement comment éviter ce genre de problème avec le classic Runtime.exec(), et je vous décrirai ensuite son substitut, le ProcessBuilder. Runtime.exec() Erreur n°1 : où est le waitFor() ? Supposons que vous ayez un petit script batch (ou shell) qui va afficher « Hello World! Packagecom.excilys.labs; import java.io.IOException; public class Main { public static final String CHEMIN = "C:\\workspace\\"; Scaling Pinterest - From 0 to 10s of Billions of Page Views a Month in Two Years. Pinterest has been riding an exponential growth curve, doubling every month and half.

Scaling Pinterest - From 0 to 10s of Billions of Page Views a Month in Two Years

They’ve gone from 0 to 10s of billions of page views a month in two years, from 2 founders and one engineer to over 40 engineers, from one little MySQL server to 180 Web Engines, 240 API Engines, 88 MySQL DBs (cc2.8xlarge) + 1 slave each, 110 Redis Instances, and 200 Memcache Instances. Stunning growth. So what’s Pinterest's story? To tell their story we have our bards, Pinterest’s Yashwanth Nelapati and Marty Weiner, who tell the dramatic story of Pinterest’s architecture evolution in a talk titled Scaling Pinterest.

Why most large-scale Web sites are not written in Java. I think that looks pretty nice.

Why most large-scale Web sites are not written in Java

But it looks nothing like what I have to work with. I'm in 'how do I get from there to here' hell. I'm in the actions, then the jsps, then struts config and back to the jsp to look at some javascript and then to some beans etc. By the time I find what I'm looking for, I can't remember why I was looking for it. I feel that pain. One thing to note too is that there is not a lick of Java in that code.

You're absolutely correct on both counts. And yes that does give me some hope. Large Scale Web Site Development. TSS recently had an active thread on Why most large-scale Web sites are not written in Java.

Large Scale Web Site Development

This is a provocative title and naturally caused a lot of passionate readers comment on this thread. The thread was started in response to a posting by Nati Shalom, which seems to have been prompted by a similar posting at highscalability.com. While I don’t disagree with the analysis presented in Nati Shalom’s post, I don’t think Java, the programming language, or JEE is to be blamed. The key driver behind most successful large scale web sites is that they are designed to perform, often taking the most unorthodox approaches possible towards scalability, and most JEE developers have neither the incentive nor the experience to make their sites scalable. How can I use Python for large scale development. Facebook shares some secrets on making MySQL scale — Cloud Computing News. When you’re storing every transaction for 800 million users and handling more than 60 million queries per second, your database environment had better be something special.

Facebook shares some secrets on making MySQL scale — Cloud Computing News

Best Practices for Large-Scale Web Sites. The Instagram Architecture Facebook Bought for a Cool Billion Dollars. It's been a well kept secret, but you may have heard Facebook will Buy Photo-Sharing Service Instagram for $1 Billion.

The Instagram Architecture Facebook Bought for a Cool Billion Dollars

Just what is Facebook buying? Here's a quick gloss I did a little over a year ago on a presentation Instagram gave on their architecture. In that article I called Instagram's architecture the "canonical description of an early stage startup in this era. " Little did we know how true that would turn out to be.