All Projects → Yelp → casper

Yelp / casper

Licence: other
Yelp's internal caching proxy, powered by Nginx and OpenResty at its core

Programming Languages

lua
6591 projects
python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to casper

cassandra-nginx-cdn
Some config files and POC code to use Apache Cassandra as distributed storage for HLS chunks accross multiple datacenters and scripts for converting/transcoding UDP MPEG-TS to HLS and vice versa. The idea is take from Globo.com’s Live Video Platform for FIFA World Cup ’14.
Stars: ✭ 24 (-70.37%)
Mutual labels:  cassandra, nginx-proxy, openresty
Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (+313.58%)
Mutual labels:  nginx-proxy, openresty
Udacity Data Engineering Projects
Few projects related to Data Engineering including Data Modeling, Infrastructure setup on cloud, Data Warehousing and Data Lake development.
Stars: ✭ 458 (+465.43%)
Mutual labels:  infrastructure, cassandra
Lua Nginx Redis
🌺 Redis、Lua、Nginx、OpenResty 笔记和资料
Stars: ✭ 757 (+834.57%)
Mutual labels:  nginx-proxy, openresty
alpine-kong
alpine-kong
Stars: ✭ 15 (-81.48%)
Mutual labels:  cassandra, openresty
Lua Cassandra
Pure Lua driver for Apache Cassandra
Stars: ✭ 95 (+17.28%)
Mutual labels:  cassandra, openresty
Nginx Admins Handbook
How to improve NGINX performance, security, and other important things.
Stars: ✭ 12,463 (+15286.42%)
Mutual labels:  nginx-proxy, openresty
punic
Punic is a remote cache CLI built for Carthage and Apple .xcframework
Stars: ✭ 25 (-69.14%)
Mutual labels:  infrastructure, caching
Paasta
An open, distributed platform as a service
Stars: ✭ 1,569 (+1837.04%)
Mutual labels:  infrastructure, yelp
ecaudit
Ericsson Audit plug-in for Apache Cassandra
Stars: ✭ 36 (-55.56%)
Mutual labels:  cassandra
infrastructure
A repository containing scripts for managing infrastructure
Stars: ✭ 18 (-77.78%)
Mutual labels:  infrastructure
janusgraph-docker
Yet another JanusGraph, Cassandra/Scylla and Elasticsearch in Docker Compose setup
Stars: ✭ 54 (-33.33%)
Mutual labels:  cassandra
nginx-proxy
Docker container for automatically creating nginx configuration based on active services in docker host.
Stars: ✭ 28 (-65.43%)
Mutual labels:  nginx-proxy
oc-speedy-plugin
Website optimization plugin for October CMS
Stars: ✭ 18 (-77.78%)
Mutual labels:  caching
cassandra-prometheus
prometheus exporter for cassandra
Stars: ✭ 25 (-69.14%)
Mutual labels:  cassandra
FYCachedURLAsset
Enhanced AVURLAsset with seamless cache layer
Stars: ✭ 18 (-77.78%)
Mutual labels:  caching
armkit
Define infrastructure resources using programming constructs and provision them using Azure ARM templates
Stars: ✭ 50 (-38.27%)
Mutual labels:  infrastructure
Troilus
Troilus is a Java client library for Cassandra.
Stars: ✭ 17 (-79.01%)
Mutual labels:  cassandra
cassandra-exporter
Java agent for exporting Cassandra metrics to Prometheus
Stars: ✭ 59 (-27.16%)
Mutual labels:  cassandra
cassandra-exporter
Simple Tool to Export / Import Cassandra Tables into JSON
Stars: ✭ 44 (-45.68%)
Mutual labels:  cassandra

Casper (a friendly Spectre)

Build Status

This repo contains Casper, a caching proxy internal to Yelp. It is built with Nginx and Openresty at its core and contains some logic in Lua to fit in our ecosystem.

Important note about naming: Casper was initially baptized "Spectre" internally. It's only after the Spectre/Meltdown vulnerabilities were published that we decided to change the name to "Casper", a more friendly and less confusing name for the outside world. If you see remnants of "Spectre" in the code, that's why!

Requirements

  • docker: make sure it's installed on your system by following the instruction for your platform here.
  • make: ensure you can run make targets with your OS (on Windows, use nmake.)
  • lua 5.1
  • luarocks
  • openresty: follow the instructions at https://openresty.org/en/installation.html

On macos you can install most of those packages easily via homebrew (https://brew.sh/). Just run brew install [email protected] openresty/brew/openresty luarocks make.

Building locally

To start Casper, run

$ make dev

To make sure it's up (change the port accordingly if you change the default):

$ curl -v localhost:8888/status

For basic debugging (is it missing/hitting the cache? Am I being correctly proxied? etc), curl, and pay attention to the "Spectre-Cache-Status" header:

$ curl -o /dev/null -iv -H 'X-Source-Id: test' -H 'X-Smartstack-Destination: yelp-main.internalapi' -H 'X-Smartstack-Source: spectre.main' -H 'Host: internalapi' 'localhost:32927/category_yelp/?locale=en_US' 2>&1 | grep 'Spectre-Cache-Status'
< Spectre-Cache-Status: hit

It can help, to get as much information as possible, to set nginx logging to debug granularity. In nginx.conf, replace the error_log directive by:

error_log /var/log/nginx.debug.log debug;

Running Tests

To run unit tests:

$ make test

To run integration tests:

$ make itest

Contributors

Casper was built and developed internally for about a year before being opensourced. In addition to the contributors listed on Github, here is a list of people who contributed to Casper before its public life:

Contributing

We welcome contributions to Casper, but keep in mind that this is a production system run inside of Yelp's infrastructure. Please get in touch with us to discuss your feature request, bug fix or enhancement by opening a Github issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].