0%

Overview

An HTTP cookie (web cookie, browser cookie) is a small piece of data that a server sends to the user's web browser. The browser may store it and send it back with the next request to the same server. Typically, it’s used to tell if two requests come from the same browser — keeping a user logged-in, for example. It remembers stateful information for the stateless HTTP protocol.

Read more »

Overview

HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:

  • Informational responses (100–199)
  • Successful responses (200–299)
  • Redirects (300–399)
  • Client errors (400–499) detected by server
  • Server errors (500–599)
Read more »

Overview

The performance of web sites and applications can be significantly improved by reusing previously fetched resources. Web caches reduce latency and network traffic and thus lessen the time needed to display a representation of a resource. By making use of HTTP caching, Web sites become more responsive.

There are several kinds of caches: these can be grouped into two main categories: private or shared caches. A shared cache is a cache that stores responses for reuse by more than one user. A private cache is dedicated to a single user.

Read more »

Overview

HTTP headers let the client and the server pass additional information with an HTTP request or response. An HTTP header consists of its case-insensitive name followed by a colon (:), then by its value. Whitespace before the value is ignored

Read more »

Git

After clone a repo from git server, git actually setups three areas for you, one is working directory(you alway see), staging(index) area(cache) and repository, git commands mainly work on these three areas, staging area is an intermediate area where commits can be formatted and reviewed before completing the commit.

One thing that sets Git apart from other tools is that it’s possible to quickly stage some of your files and commit them without committing all of the other modified files in your working directory or having to list them on the command line during the commit.

stage area

Read more »

Introduction

There are two powerful tools for memory check, one is valgrind, the other is address sanitizer, the difference is

  • valgrind, no need to compile your app, have big impact on performance(down 10-50 times), can’t work well with multiple process, but can detect leak in shared library.
  • address sanitizer, need to compile your app, has less impact for app run(down 2 times)

Always use address sanitizer if you can recomplie your application!

Read more »

Introduction

There are lots of tools for traffic capturing, sending, replaying about protocols, here are some examples of these popular tools.

capture

  • tcpdump(linux)
  • wireshark(windows/linux)

sending/replay

  • sendip
  • tcprelay

http benchmark

  • ab
  • wrk

io benchmark

  • dd
Read more »

Introduction

Core file is generated when program crashes, if it’s not turned off, see limitation for the current user by $ ulimit -a or set it with unlimited by $ ulimit -c unlimited to allow core generation.

ulimit reads /etc/security/limits.conf that controls the limitation for the system, like core file, max opened file etc

Read more »