SSH是一种网络协议,用于计算机之间的加密登录
Creating a Custom Rails Environment - RichOnRails.com - 0 views
SSH原理与运用(二):远程操作与端口转发 - 阮一峰的网络日志 - 0 views
Redesigning Evernote for iOS - Evernote Design - Medium - 0 views
13More
MySQL :: MySQL 5.7 Reference Manual :: 19.2.1.2 Configuring an Instance for Group Repli... - 0 views
- ...10 more annotations...
-
The server listens on this port for member-to-member connections. This port must not be used for user applications at all
-
The loose- prefix used for the group_replication variables above instructs the server to continue to start if the Group Replication plugin has not been loaded at the time the server is started.
-
For example, if each server instance is on a different machine use the IP and port of the machine, such as 10.0.0.1:33061. The recommended port for group_replication_local_address is 33061
-
The server that starts the group does not make use of this option, since it is the initial server and as such, it is in charge of bootstrapping the group
11More
MySQL :: MySQL 5.7 Reference Manual :: 19.1.1.2 Group Replication - 0 views
-
The communication layer provides a set of guarantees such as atomic message and total order message delivery.
- ...8 more annotations...
-
a replication group is formed by multiple servers and each server in the group may execute transactions independently
-
any RW transaction the group needs to decide whether it commits or not, thus the commit operation is not a unilateral decision from the originating server
-
when a transaction is ready to commit at the originating server, the server atomically broadcasts the write values (rows changed) and the correspondent write set (unique identifiers of the rows that were updated). Then a global total order is established for that transaction.
-
The resolution procedure states that the transaction that was ordered first commits on all servers, whereas the transaction ordered second aborts, and thus is rolled back on the originating server and dropped by the other servers in the group. This is in fact a distributed first commit wins rule
-
Group Replication is a shared-nothing replication scheme where each server has its own entire copy of the data
11More
MySQL :: MySQL 5.7 Reference Manual :: 19.1 Group Replication Background - 0 views
- ...8 more annotations...
-
the ultimate challenge is to fuse the logic of the database and data replication with the logic of having several servers coordinated in a consistent and simple way
-
MySQL Group Replication provides distributed state machine replication with strong coordination between servers.
-
The group can operate in a single-primary mode with automatic primary election, where only one server accepts updates at a time.
-
For a transaction to commit, the majority of the group have to agree on the order of a given transaction in the global sequence of transactions
-
Deciding to commit or abort a transaction is done by each server individually, but all servers make the same decision
6More
MySQL :: MySQL 5.7 Reference Manual :: 20.4 Getting Started with InnoDB Cluster - 0 views
-
To create a new InnoDB cluster, the MySQL Shell must be connected to the MySQL Server instance. By default, this MySQL Server instance is the seed instance of the new InnoDB cluster and hold the initial data set.
- ...3 more annotations...
9More
MySQL :: MySQL 5.7 Reference Manual :: 20.2 Introducing InnoDB Cluster - 0 views
-
The cluster of servers has a single master, called the primary, which acts as the read-write master.
- ...6 more annotations...
-
AdminAPI, which enables you to create and administer an InnoDB cluster, using either JavaScript or Python scripting
-
Caches the metadata of the InnoDB cluster and performs high availability routing to the MySQL Server instances which make up the cluster
-
Group Replication mechanism to allow data to be replicated from the primary to the secondaries in the cluster
52More
Understanding Nginx HTTP Proxying, Load Balancing, Buffering, and Caching | DigitalOcean - 0 views
-
Nginx is often set up as a reverse proxy solution to help scale out infrastructure or to pass requests to other servers that are not designed to handle large client loads
- ...48 more annotations...
-
provides you with flexibility in easily adding backend servers or taking them down as needed for maintenance
-
Proxying in Nginx is accomplished by manipulating a request aimed at the Nginx server and passing it to other servers for the actual processing
-
Nginx can proxy requests to servers that communicate using the http(s), FastCGI, SCGI, and uwsgi, or memcached protocols through separate sets of directives for each type of proxy
-
When a request matches a location with a proxy_pass directive inside, the request is forwarded to the URL given by the directive
-
For example, when a request for /match/here/please is handled by this block, the request URI will be sent to the example.com server as http://example.com/match/here/please
-
The request coming from Nginx on behalf of a client will look different than a request coming directly from a client
-
Nginx, by default, will consider any header that contains underscores as invalid. It will remove these from the proxied request
-
-
if your backend application will be processing non-standard headers, you must make sure that they do not have underscores
-
by default, this will be set to the value of $proxy_host, a variable that will contain the domain name or IP address and port taken directly from the proxy_pass definition
-
This is selected by default as it is the only address Nginx can be sure the upstream server responds to
-
The headers sent by the client are always available in Nginx as variables. The variables will start with an $http_ prefix, followed by the header name in lowercase, with any dashes replaced by underscores.
-
set the "Host" header to the $host variable. It is the most flexible and will usually provide the proxied servers with a "Host" header filled in as accurately as possible
-
sets the "Host" header to the $host variable, which should contain information about the original host being requested
-
This variable takes the value of the original X-Forwarded-For header retrieved from the client and adds the Nginx server's IP address to the end.
-
Once defined, this name will be available for use within proxy passes as if it were a regular domain name
-
By default, this is just a simple round-robin selection process (each request will be routed to a different host in turn)
-
Specifies that new connections should always be given to the backend that has the least number of active connections.
-
Without buffers, data is sent from the proxied server and immediately begins to be transmitted to the client.
-
With buffers, the Nginx proxy will temporarily store the backend's response and then feed this data to the client
-
the sizing directives are configured per request, so increasing them beyond your need can affect your performance
-
A high availability (HA) setup is an infrastructure without a single point of failure, and your load balancers are a part of this configuration.
-
multiple load balancers (one active and one or more passive) behind a static IP address that can be remapped from one server to another.
-
proxy_cache backcache;
-
The proxy_cache_bypass directive is set to the $http_cache_control variable. This will contain an indicator as to whether the client is explicitly requesting a fresh, non-cached version of the resource
-
For private content, you should set the Cache-Control header to "no-cache", "no-store", or "private" depending on the nature of the data
1More
Laptop USB Console Adapter - CV211, ATEN KVM Cables - 0 views
-
" 'Turn your laptop into a mobile console in a few seconds.' The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install. High efficiency in a compact design, the CV211 offers bi-directional file transfers, hotkey macros, video recording and screenshots through a USB 2.0 and VGA composite cable."
13More
Rails Environment Variables · RailsApps - 1 views
-
Operating systems (Linux, Mac OS X, Windows) provide mechanisms to set local environment variables, as does Heroku and other deployment platforms.
-
In general, you shouldn’t save email account credentials or private API keys to a shared git repository.
- ...10 more annotations...
-
You could “hardcode” your Gmail username and password into the file but that would expose it to everyone who has access to your git repository.
-
It’s important to learn to use the Unix shell if you’re commited to improving your skills as a developer.
-
The gem reads a config/application.yml file and sets environment variables before anything else is configured in the Rails application.
-
YAML.load(File.open(env_file)).each do |key, value| ENV[key.to_s] = value end if File.exists?(env_file)
18More
探索 Docker bridge 的正确姿势,亲测有效! | DaoCloud - 1 views
- ...15 more annotations...
-
宿主机上的 docker0 网桥发现数据包的目的地址为外界的 IP 和端口,便会将数据包转发给 eth0 ,并从 eth0 发出去。由于存在 SNAT 规则,会将数据包的源地址转换为宿主机的 ip 和端口
-
veth pair是用于不同network namespace间进行通信的方式,veth pair 将一个 network namespace 数据发往另一个 network namespace 的 veth
89More
Rails Routing from the Outside In - Ruby on Rails Guides - 0 views
-
Resource routing allows you to quickly declare all of the common routes for a given resourceful controller.
-
Rails would dispatch that request to the destroy method on the photos controller with { id: '17' } in params.
- ...86 more annotations...
-
resource :photo and resources :photos creates both singular and plural routes that map to the same controller (PhotosController).
-
One way to avoid deep nesting (as recommended above) is to generate the collection actions scoped under the parent, so as to get a sense of the hierarchy, but to not nest the member actions.
-
You can leave out the :on option, this will create the same member route except that the resource id value will be available in params[:photo_id] instead of params[:id].
-
Routing Concerns allows you to declare common routes that can be reused inside other resources and routes
-
This will recognize /photos/1/preview with GET, and route to the preview action of PhotosController, with the resource id value passed in params[:id]. It will also create the preview_photo_url and preview_photo_path helpers.
-
This will enable Rails to recognize paths such as /photos/search with GET, and route to the search action of PhotosController. It will also create the search_photos_url and search_photos_path route helpers.
-
When you set up a regular route, you supply a series of symbols that Rails maps to parts of an incoming HTTP request.
-
This route will also route the incoming request of /photos to PhotosController#index, since :action and :id are
-
Inside the show action of UsersController, params[:username] will contain the username for the user.
-
'GET' in Rails won't check for CSRF token. You should never write to the database from 'GET' requests
-
-
-
This will provide you with URLs such as /bob/articles/1 and will allow you to reference the username part of the path as params[:username] in controllers, helpers and views
-
generate only the routes that you actually need can cut down on memory use and speed up the routing process.
28More
Rails Database Best Practices - 0 views
- ...24 more annotations...
-
.merge() makes it easy to use scopes from other models that have been joined into the query, reducing potential duplication.
-
ActiveRecord provides an easy API for doing many things with our database, but it also makes it pretty easy to do things inefficiently. The layer of abstraction hides what’s really happening.
-
An ad-hoc query embedded in a controller (or view, task, etc) is harder to test in isolation and cannot be reused
-
to scopes and Query objects
View AllMost Active Members
View AllTop 10 Tags
- 151system
- 133programming
- 102docker
- 101rails
- 89development
- 83devops
- 81kubernetes
- 80javascript
- 77database
- 71ruby
- 68linux
- 64web
- 61server
- 58networking
- 52security
- 49python
- 42mysql
- 42php
- 40framework
- 35performance