Do not use this guide. The dnscrypt protocol and dnscrypt-proxy configuration file have changed a lot since I wrote this gist. Check the following links for help:
- Install DNSMasq
$ brew install dnsmasq| @Configuration | |
| @PropertySource(CoreSpringConfig.PROPERTIES) | |
| public class WebappSpringConfig { | |
| @Autowired | |
| private Environment environment; | |
| /** | |
| * 'springSecurityFilterChain' is Magic ID and it is required by Spring Security DelegatingFilterProxy in web.xml | |
| * |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>group</groupId> | |
| <artifactId>dummy</artifactId> | |
| <name>Dummy Project</name> | |
| <version>1.0.12</version> | |
| <packaging>pom</packaging> | |
| <scm> | |
| <connection>scm:git:https://......</connection> | |
| <tag>HEAD</tag> |
| 大型网站技术架构:核心原理与案例分析 | |
| 跳转至: 导航、 搜索 | |
| p XI. 。。。但能在比较短的时间内解决这些技术问题,也说明了网站架构其实并不难,真正能解决问题的技术一定是简单的 | |
| 大内存服务器作为分布式缓存 | |
| 缓存预热、缓存穿透(请求不存在的数据?) | |
| JBoss Cache | |
| Memcached:TCP+文本命令? | |
| 基于Libevent | |
| 应用服务器集群+负载均衡 |
| # carbon-cache-a upstart job | |
| # | |
| # Daniel Beckham | |
| # @dbeckham | |
| # https://github.com/dbeckham | |
| # | |
| # Tested with Graphite carbon tag v0.9.12 from: | |
| # https://github.com/graphite-project/carbon | |
| # | |
| # Upstart config: /etc/init/carbon-cache-a.conf |
| public interface ActiveCountMetric { | |
| void inc(); | |
| void dec(); | |
| } |
| #!/bin/sh | |
| # | |
| # gunicorn_sr Startup script for gunicorn for sr | |
| # | |
| # chkconfig: - 86 14 | |
| # processname: gunicorn | |
| # pidfile: | |
| # description: Python application server | |
| # | |
| ### BEGIN INIT INFO |
| import com.yammer.metrics.Metrics; | |
| import com.yammer.metrics.core.*; | |
| import com.yammer.metrics.reporting.GraphiteReporter; | |
| import com.yammer.metrics.reporting.SocketProvider; | |
| import com.yammer.metrics.stats.Snapshot; | |
| import java.io.IOException; | |
| import java.util.concurrent.TimeUnit; | |
| /** |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| import org.apache.commons.configuration.AbstractConfiguration; | |
| import com.netflix.config.ConcurrentCompositeConfiguration; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class ConcurrentCompositeConfigurationFactory { | |
| List<AbstractConfiguration> configs = new ArrayList<AbstractConfiguration>(); | |
| public void setConfigs(List<AbstractConfiguration> configs) { |