-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from AstRonin/cluster
Cluster
- Loading branch information
Showing
14 changed files
with
602 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Upgrading Instructions | ||
|
||
### From 0.7.0 To 0.8.0 | ||
|
||
- Configuration tuple list changed to map in `sys.config`. | ||
- Added support of cluster in `sgi_n2o_fcgi_handler` and `sgi_n2o_uwsgi_handler`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,79 @@ | ||
[ | ||
{n2o, [{port,8000}, | ||
{app,review}, | ||
{upload,"./apps/review/priv/static/"}, | ||
{search,"/Users/5HT/depot/synrc/synrc.com/apps/*/doc/web/*.htm"}, | ||
{route,routes}, | ||
{mq,n2o_mq}, | ||
{formatter,bert}, | ||
{log_modules,config}, | ||
{log_level,config}, | ||
{log_backend,n2o_log}, | ||
{session,n2o_session}, | ||
{auto_session,disabled}, | ||
{origin,<<"*">>}, | ||
{bridge,n2o_cowboy}, | ||
{pickler,n2o_pickle}, | ||
{erroring,n2o_error}, | ||
{event,pickle}]}, | ||
{kvs, [{dba,store_mnesia}, | ||
{schema, [kvs_user, kvs_acl, kvs_feed, kvs_subscription ]} ]}, | ||
{sgi, [ | ||
{servers, [ | ||
[{name, default}, | ||
{address, localhost}, | ||
{port, 9000}, %% default port to FastCGI | ||
{timeout, 60000}, | ||
{weight, 2}, | ||
{start_connections, 2}, | ||
{max_connections, 10}, %% run N processes with 1 connection on each process. Count cannot be bigger then children of fcgi processes | ||
{max_fails, 5}, | ||
{failed_timeout, 60}], % failed_timeout in seconds | ||
[{name, aaa}, | ||
{address, localhost}, | ||
{port, 9001}, | ||
{timeout, 60000}, | ||
{weight, 5}, | ||
{start_connections, 2}, | ||
{max_connections, 4}, | ||
{max_fails, 5}, | ||
{failed_timeout, 60}] | ||
]}, | ||
{n2o, [{port, 8000}, | ||
{app, review}, | ||
{upload, "./apps/review/priv/static/"}, | ||
{search, "/Users/5HT/depot/synrc/synrc.com/apps/*/doc/web/*.htm"}, | ||
{route, routes}, | ||
{mq, n2o_mq}, | ||
{formatter, bert}, | ||
{log_modules, config}, | ||
{log_level, config}, | ||
{log_backend, n2o_log}, | ||
{session, n2o_session}, | ||
{auto_session, disabled}, | ||
{origin, <<"*">>}, | ||
{bridge, n2o_cowboy}, | ||
{pickler, n2o_pickle}, | ||
{erroring, n2o_error}, | ||
{event, pickle}]}, | ||
{kvs, [{dba, store_mnesia}, | ||
{schema, [kvs_user, kvs_acl, kvs_feed, kvs_subscription]}]}, | ||
{sgi, [{servers, [ | ||
#{name => default, | ||
address => localhost, | ||
port => 9000, %% default port to FastCGI | ||
timeout => 60000, | ||
weight => 2, | ||
start_connections => 2, | ||
max_connections => 10, %% run N processes with 1 connection on each process. Count cannot be bigger then children of fcgi processes | ||
max_fails => 5, | ||
failed_timeout => 60}, % failed_timeout in seconds | ||
#{name => aaa, | ||
address => localhost, | ||
port => 9001, | ||
timeout => 60000, | ||
weight => 5, | ||
start_connections => 2, | ||
max_connections => 4, | ||
max_fails => 5, | ||
failed_timeout => 60}]}, | ||
|
||
%% {proxy, #{type => socks5, %% Settings of proxy | ||
%% address => localhost, | ||
%% port => 9050, | ||
%% timeout => 60000, | ||
%% username => <<"username">>, | ||
%% password => <<"password">> | ||
%% }}, | ||
%% {proxy, #{type => socks5, %% Settings of proxy | ||
%% address => localhost, | ||
%% port => 9050, | ||
%% timeout => 60000, | ||
%% username => <<"username">>, | ||
%% password => <<"password">> | ||
%% }}, | ||
|
||
{balancing_method, priority}, % priority | blurred, priority is default | ||
{multiplexed, unknown}, % unknown | 1 | 0 | ||
{response_timeout, 600000}, % 1 minute | ||
{vhosts, [ %% settings for family of cgi interfaces | ||
[ | ||
{server_name, "phphost.com"}, %% set your server name(domain), for local tests add line <127.0.0.1 phphost.com> into "/etc/hosts" (in Linux), "C:\Windows\System32\drivers\etc\hosts"(in Windows) | ||
{aliase, "localhost"}, | ||
{root, "/home/roman/dev/sgi/samples/cgi-scripts/php"}, %% set you FULL path to your codes | ||
{index, "index.php"}%, %% default index file | ||
%% rewrite very simple and support 2 cases: equal path and all("*"), you can remove it line if don't needed | ||
%%{rewrite, [{"*", "index.php"}]} | ||
], | ||
[ | ||
{server_name, "yourhost2.com"}, %% set your server name(domain) | ||
{aliase, "localhost"}, | ||
{root, "/usr/local/www/yourhost2.com"}, %% set you full path to your codes | ||
{index, "index.php"}, %% default index file | ||
%% rewrite very simple and support 2 cases: equal path and all("*"), you can remove it line if don't needed | ||
{rewrite, [{"*", "index.php"}]} | ||
] | ||
|
||
%% {cluster, #{ | ||
%% nodes => ['[email protected]'], | ||
%% syncr_interval => 60000, | ||
%% response_timeout => 600000, | ||
%% cpu_overload => 80, % max percent of loading when need call to cluster | ||
%% mem_overload => 80 % max percent of loading when need call to cluster | ||
%% }}, | ||
|
||
{balancing_method, priority}, % priority | blurred, priority is default | ||
{multiplexed, unknown}, % unknown | 1 | 0 | ||
{response_timeout, 600000}, % 1 minute | ||
{vhosts, [ %% settings for family of cgi interfaces | ||
#{server_name => "phphost.com", | ||
alias => "localhost", | ||
root => "/home/roman/dev/sgi/samples/cgi-scripts/php", | ||
index => "index.php" %, %% default index file | ||
%% rewrite very simple and support 2 cases: equal path and all("*"), you can remove it line if don't needed | ||
%%rewrite => [{"*", "index.php"}] | ||
}, | ||
#{server_name => "yourhost2.com", %% set your server name(domain) | ||
alias => "localhost", | ||
root => "/usr/local/www/yourhost2.com", %% set you full path to your codes | ||
index => "index.php", %% default index file | ||
%% rewrite very simple and support 2 cases: equal path and all("*"), you can remove it line if don't needed | ||
rewrite => [{"*", "index.php"}] | ||
} | ||
]} | ||
]}, | ||
]}, | ||
"sys-local.config" | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.