Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0 #85

Open
wants to merge 249 commits into
base: master
Choose a base branch
from
Open

v1.0 #85

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
cd88306
MultiTransport accepts roundtrippers instead urls
mjarco Oct 10, 2017
c7c37bf
New storages definitions
mjarco Oct 11, 2017
fda0444
Maybe I should go slower on this
mjarco Oct 11, 2017
c28ddca
crdstore remote credentials package prototype
bieli Oct 17, 2017
18615aa
HTTPHandler config
mjarco Oct 17, 2017
31fb984
Storages configuration
mjarco Oct 18, 2017
ef5e944
crdstore remote credentials package prototype v2
Oct 18, 2017
9731f68
[broken] rewiring application start up
mjarco Oct 19, 2017
410f15a
wip
Oct 19, 2017
19ffb99
wip2
Oct 19, 2017
ae1e1ae
wip3
Oct 19, 2017
1caccac
add background refresh
Oct 19, 2017
edb7585
fix concurrency
Oct 20, 2017
dcc2429
S3 signing works
mjarco Oct 26, 2017
94db49c
S3 signing works
mjarco Oct 26, 2017
44405ea
Test fixes
mjarco Nov 3, 2017
371cfe5
sharding_test - updating part1
bieli Nov 3, 2017
887b5cf
Add storage tests
Nov 3, 2017
6f47878
Merge branch 'crdstore' into S3authservice
Nov 6, 2017
db497f4
akubra/config tests build
mjarco Nov 7, 2017
4195cec
akubra/config tests build
mjarco Nov 7, 2017
4301adc
akubra/config tests build
mjarco Nov 7, 2017
48d0f30
Config package validators fixes
mjarco Nov 7, 2017
62ded4c
Merge remote-tracking branch 'origin/rewrite-config' into rewrite-con…
mjarco Nov 7, 2017
d3e3b9f
upgrading unit tests for sharding
bieli Nov 7, 2017
d1cfd90
upgrading testify vendor library
bieli Nov 7, 2017
398a2e6
upgrading akuba's unit tests (prototyping)
bieli Nov 7, 2017
bab5ee3
upgrading travis for CI with golang 1.9
bieli Nov 7, 2017
080fdc3
CI fixes
bieli Nov 7, 2017
d3cc63f
CI fixes
bieli Nov 7, 2017
a459cb2
CI fixes
bieli Nov 7, 2017
de17869
adding unit tests for types - CI fixing
bieli Nov 7, 2017
9a50ce4
adding unit tests for types - CI fixing
bieli Nov 7, 2017
7686cc7
Add S3authservice backend type
Nov 7, 2017
13219a7
Fix storages.JoinCluster + add storages tests
Nov 8, 2017
d36fdba
updating sharding_test + CI fixing
bieli Nov 8, 2017
097d529
Merging with rewrite-config branch
bieli Nov 8, 2017
736d3f6
Fixes after merging with rewrite-config branch
bieli Nov 8, 2017
8ffeef3
Merge remote-tracking branch 'origin/crdstore' into v1.0
Nov 8, 2017
1920f3c
Merge S3authservice branch
bieli Nov 8, 2017
bc8b117
Updating glide.lock
bieli Nov 8, 2017
fb24e14
add logs + fixing handler url printing in logs
bieli Nov 8, 2017
2a590ba
S3authservice to v1.0 (#60)
bnogas Nov 23, 2017
9ca9069
Code style improvements (#63)
mjarco Nov 30, 2017
9818b64
Listing merge (#64)
mjarco Dec 5, 2017
676de51
maintenance-mode-for-backends (#67)
bieli Dec 7, 2017
e51eb7c
Nonexistent backend error (#66)
mjarco Dec 7, 2017
0a81f5e
Slow lint (#68)
mjarco Dec 13, 2017
a40bf0b
fixing HumanSizeUnits (for 1MB == 1048576 bytes)
bieli Dec 20, 2017
4edd79a
fixing doc. for technical endpoint path
bieli Dec 20, 2017
5168eef
Log fatal instead of panic if CredentialsStore is not defined
Dec 13, 2017
b00bc05
Added brimapi log hook (#69)
mjarco Jan 9, 2018
5da416c
add AWSv4 signature
Dec 20, 2017
a81d117
Cluster ring search (#71)
mjarco Feb 1, 2018
f03f4a9
Fix bucket acl request handling (#72)
mjarco Feb 1, 2018
5b82433
Fix late responses (#73)
mjarco Feb 7, 2018
c646be3
transports behaviours configuration proposal
bieli Feb 8, 2018
90a1a35
transports behaviours configuration regexp parser + unit tests
bieli Feb 9, 2018
5524938
fixing HumanSizeUnits (for 1MB == 1048576 bytes)
bieli Dec 20, 2017
ce6d953
fixing doc. for technical endpoint path
bieli Dec 20, 2017
207f228
Added brimapi log hook (#69)
mjarco Jan 9, 2018
f7dd0b7
some spaces in Authorization header are optional
Feb 21, 2018
5113635
Merge pull request #70 from allegro/aws_v4
ksitak Feb 21, 2018
574043d
Multipart upload support (#74)
Feb 21, 2018
2a6ca6b
OBRAZKI-574 | QueryParam field isn't required
Feb 22, 2018
b8d3ec4
updating GetMatchedTransport for Transports configuration + unit tests
bieli Feb 26, 2018
df5f7ae
Select RoundTripper (initialized with Transports config) by request p…
bieli Feb 27, 2018
9fbc83b
removing unused RoudTrip transport arg. in NewRegions func.
bieli Feb 27, 2018
46e61d1
logical validator for Transports required last item without Triggers …
bieli Feb 27, 2018
5185c0e
logical validator for Transports required last item without Triggers …
bieli Feb 27, 2018
6e60566
updating TransportsEntryLogicalValidator validator + unit tests
bieli Mar 1, 2018
6141c94
fixing goimports
bieli Mar 1, 2018
4bc9291
fixing CI
bieli Mar 1, 2018
06e2624
fixing CI
bieli Mar 1, 2018
fa8e228
removing MergingStrategy from struct, config, README example
bieli Mar 2, 2018
6c18e5b
changing Transports structure from map to list for fixing CI
bieli Mar 5, 2018
b804674
changing Transports structure from map to list for fixing CI
bieli Mar 5, 2018
882abbf
Merge branch 'v1.0' into v1.0-transports-behaviours
bieli Mar 6, 2018
1d72aa6
fixing for PR comments
bieli Mar 6, 2018
1cacb79
fixing unit tests for backend
bieli Mar 8, 2018
9083bc4
fixing unit tests for multipart round tripper
bieli Mar 9, 2018
686e865
refactoring for PR suggestions
bieli Mar 12, 2018
a62063a
refactoring for PR suggestions
bieli Mar 12, 2018
380f7f0
refactoring for PR suggestions
bieli Mar 12, 2018
f5c8d34
removing default transport (conceptual change) + adding YAML validato…
bieli Mar 12, 2018
dc7141a
OBRAZKI-574 | changing Triggers -> Matchers section name (in Transpor…
Mar 13, 2018
aa4eb85
using empty Matchers as default transport for any request in Transpor…
bieli Mar 13, 2018
af1b4a0
refactoring transports container with RoundTripper
bieli Mar 13, 2018
2c0299f
refactoring transports container with RoundTripper
bieli Mar 13, 2018
e721a3a
refactoring struct - transports container to matcher
bieli Mar 13, 2018
442590a
fixing CI - renaming struct
bieli Mar 13, 2018
a55bb64
refactoring from Matcher to http.RoundTripper interface
bieli Mar 13, 2018
7cc9bba
Revert "refactoring from Matcher to http.RoundTripper interface"
Mar 14, 2018
c7db32b
refactoring Matcher
bieli Mar 14, 2018
83ddeda
refactoring from Matcher to http.RoundTripper interface (+fixing unit…
bieli Mar 14, 2018
e7e4b1e
CR fix - Readability counts
bieli Mar 14, 2018
479b5e2
small refactoring + unit tests for transport matcher
bieli Mar 14, 2018
64815dc
CR fixes
bieli Mar 14, 2018
bf56531
CR fixes
bieli Mar 14, 2018
139bcca
Details in Transport config is required (adding validator + unit tests)
bieli Mar 15, 2018
d64b1d3
bug fixing in selecting transport after manual tests + updating unit …
bieli Mar 15, 2018
bfb7400
bug fixing in selecting transport after manual tests + updating unit …
bieli Mar 15, 2018
c0f2570
CR fixes - refactoring Transport: Details -> Properties
bieli Mar 15, 2018
c1e8375
CR fixes - refactoring Transport: Details -> Properties
bieli Mar 15, 2018
2aa079d
CR fixes - refactoring Transport: Matches -> ApplyRule
bieli Mar 15, 2018
066cb9d
CR fixes - refactoring Transport: Matches -> ApplyRules
bieli Mar 15, 2018
1ae4054
CR fixes - removing encapsulated name in struct
bieli Mar 16, 2018
f3afea2
refactoring Transport: ApplyRules -> Rules
bieli Mar 16, 2018
d667d18
CR fix - refactoring compileRules method's condition
bieli Mar 16, 2018
c230a49
bug fix - removing IdleConnTimeout property from transports logical v…
bieli Mar 16, 2018
02e2ec8
CR fix - remove default const.
bieli Mar 19, 2018
b7abf95
CR fix - changing transport name in unit test
bieli Mar 19, 2018
a7b2a4b
Fix listings (#77)
mjarco Mar 19, 2018
dd8295c
CR fix - changing transport definition name in unit test
bieli Mar 19, 2018
ba0d136
CR fixes
bieli Mar 20, 2018
ff8869d
CR fixes - in README.md and updating validator + unit tests
bieli Mar 20, 2018
772397b
CR fixes - typos
bieli Mar 21, 2018
f83b9ed
CR fixes - alternative message in logs for backend error when transpo…
bieli Mar 21, 2018
7b4b41e
Merge remote-tracking branch 'origin/v1.0' into v1.0-transports-behav…
bieli Mar 21, 2018
5e4c8bd
CI fixed - return with else WARN
bieli Mar 21, 2018
7768a5d
CR fix - update exit code
Mar 22, 2018
84a1db8
CR fix - mute log message about transport not matcheing in backend lo…
Mar 22, 2018
bac56ef
CR fix - renaming struct
Mar 22, 2018
b986396
CR fix - lang. in README
Mar 23, 2018
07e5da9
Merge pull request #76 from allegro/v1.0-transports-behaviours
bieli Mar 23, 2018
13b3cc9
fixing problem with Makefile and upgrading version
bieli Mar 26, 2018
9f80ab9
fixing problem with Makefile and upgrading version
bieli Mar 26, 2018
01f3449
fixing problem with Makefile and upgrading version
bieli Mar 26, 2018
885afa4
fixing problem with Makefile and upgrading version
bieli Mar 26, 2018
e3c412e
fixing problem with Makefile and upgrading version
bieli Mar 26, 2018
5c7846c
Merge pull request #80 from allegro/v1.0-Makefile-update
bieli Mar 26, 2018
e0d9c57
fixing problem with Makefile commit (version comment with new line text)
bieli Mar 26, 2018
898c577
Merge pull request #81 from allegro/v1.0-Makefile-commit-extration
bieli Mar 26, 2018
92569b5
More bucket requests handling (#79)
mjarco Apr 4, 2018
cda83d0
Fix: Additional headers configuration is reachable for HeadersSuplier…
mjarco Apr 6, 2018
54441ea
Merge remote-tracking branch 'origin/master' into v1.0
Apr 18, 2018
0ab81f3
Added: metrics for CLOSE_WAIT duration, Added: filter synclog read ev…
mjarco Apr 24, 2018
963c07e
Fixed continuation tokens
Apr 30, 2018
b2751f3
sync tasks log by service discovered from consul
bieli May 9, 2018
7caed12
update README and glide.lock
bieli May 9, 2018
4b2eaad
update README and glide.lock
bieli May 9, 2018
7f0a75f
update README and glide.lock
bieli May 9, 2018
421e892
reverting README and freezed vendors
bieli May 10, 2018
30aa23a
reverting README and freezed vendors
bieli May 10, 2018
17f1f28
Merge pull request #87 from allegro/fix-continuation-tokens
ksitak May 11, 2018
116da7d
updating code with locking
bieli May 14, 2018
3bb466c
updating structs with syncmap.Map and locking methods
bieli May 14, 2018
6e001c9
updating method name and removing go-cache from glide
bieli May 14, 2018
472ad96
adding timeout for HTTP consul client + updating code with goimports
bieli May 14, 2018
21b7c15
adding integration tests for brimapi (sync tasks logger) + CR fixes
bieli May 14, 2018
99369a8
fixing Go version to 1.10.x in travis
bieli May 14, 2018
ff550cc
CR fixes and refactoring
bieli May 16, 2018
02098e0
CR fixes and refactoring
bieli May 16, 2018
bb705c0
CR fixes and refactoring + unit testing instead of integration testing
bieli May 18, 2018
23dda51
CI fixes
bieli May 18, 2018
ee60626
CR fixes
bieli May 18, 2018
791dcfd
CR fix
bieli May 21, 2018
926521b
Merge pull request #89 from allegro/v1.0--sync-task-by-service-from-c…
bieli May 21, 2018
777e506
Minimalize close waits (#91)
mjarco Jun 6, 2018
ec33c38
Leaking goroutines fix
Jun 19, 2018
afba243
Fixed context cancelation
Jun 20, 2018
5dd1186
Debug messages on response body close
Jun 29, 2018
5adeae0
More consistent logging and close wait fix
Jun 29, 2018
b57d679
Fix: broken multipart
Jun 29, 2018
64d6f6c
Fix synclog backend reporting
Jul 2, 2018
4d247a8
Added forced auth backends
Jul 2, 2018
743b19c
Bucket location simplistic implementation
Jul 3, 2018
88f04f6
More verbose debug log. Added dial timeout
Jul 4, 2018
85a03c7
Exported multipart specific errors. Not fully drained response body w…
Jul 6, 2018
870dde2
Add log on failed request to BrimApi
Jul 16, 2018
b536687
Revert log
Jul 16, 2018
e11a248
Handle both V2 and V4 when extracting access key
Jul 17, 2018
5fe1265
Log success/error when adding sync task to main log instead of stdout
Jul 17, 2018
15405f1
Mem leak2 (#92)
mjarco Jul 17, 2018
b424a33
Fix linter
Jul 17, 2018
38d862d
Merge pull request #93 from allegro/sync-log-fixes
Jul 17, 2018
a44a06e
ACL hot fix (#94)
mjarco Jul 18, 2018
57892b4
Sign only requests with enumerated http methods in S3FixedKey backend…
mjarco Jul 20, 2018
fe45696
Instead of http status 203 append header (#98)
mjarco Jul 24, 2018
6b5c92b
Fixed: no more panic if multipart requests endup with error (#100)
mjarco Sep 10, 2018
b57db5b
Fixed: close wait in partially supported buckets requests (#101)
mjarco Sep 12, 2018
efbb192
Fixed: concurent headers read and write (#99)
mjarco Sep 13, 2018
5097d98
Fixed: invalid read od closed body error (#102)
mjarco Sep 18, 2018
646852c
Work in progress
Oct 3, 2018
ed74398
Regression calls header switch (#104)
mjarco Oct 3, 2018
18ee864
Fix transfer chunked empty body request (#103)
mjarco Oct 3, 2018
7ca93a6
Merge remote-tracking branch 'origin/v1.0' into balancing
Oct 4, 2018
67e3852
Working breaker
Oct 8, 2018
5631bc0
Integration
Oct 11, 2018
bc6098e
Balancing integration
Oct 12, 2018
ca8f512
Configuration language adjustments
Oct 15, 2018
c0a686d
Configuration scheme, validation and test fixes
Oct 16, 2018
2f13508
Silence startup messages
Oct 16, 2018
452efe9
Renamed files
Oct 16, 2018
ded1321
Add some random data to node stats, so balancing will be more even on…
Oct 17, 2018
3847aea
Balancer and breaker metrics
Oct 18, 2018
2eeb5f0
Log defaultRing usage with Host from request
Oct 18, 2018
f7ea52c
Merge pull request #108 from allegro/v1.0--default-region--requests-h…
bieli Oct 18, 2018
64b4e9a
Linguistic improvements, node reactivation goroutine
Oct 19, 2018
5d65ae6
Typo fix
Oct 19, 2018
58d540c
Fixed: node reactivation when circut breaker closes
Oct 23, 2018
470741f
Fixes
Oct 30, 2018
6297750
Fixed nil dereference (#109)
mjarco Oct 30, 2018
7e5e6ec
Fixes
Oct 31, 2018
723a025
Concurency test fixed
Nov 9, 2018
73be064
Benchmark added
Nov 9, 2018
7ce573a
Fixed: return errorRate not successRate
Nov 15, 2018
5f53768
Revert "Benchmark added"
Nov 15, 2018
f54769a
40X are no longer backend errors
Nov 15, 2018
d76597c
Merge remote-tracking branch 'origin/balancing' into HEAD
Nov 15, 2018
1b94974
Debug remove
Nov 15, 2018
ef782b7
Record requests if watchdog is defined
Nov 27, 2018
3731e9b
Validate watchdog config
Nov 27, 2018
ad19632
Setup main, connect to postgres
Nov 28, 2018
61eb9bd
Allow any sql db to act as a watcher
Nov 28, 2018
c300c8e
SQL integration
Nov 28, 2018
152eef5
Make existing tests aware of watchdog.
Nov 29, 2018
76a953a
Add tests for config, validation.
Nov 29, 2018
e474fa2
Add record only if there are more than one backend in a shard.
Nov 29, 2018
9f129f2
Integration tests.
Nov 29, 2018
b7eae81
Remove comment, add DEFAULT NOW();
Nov 30, 2018
16c4357
Add index, fix multipart condition.
Nov 30, 2018
13903d9
Add watchdogDeletePicker
Nov 30, 2018
2247b36
Linting
Nov 30, 2018
e3ec486
Lining 2
Nov 30, 2018
0c1752f
Fix deps
Dec 3, 2018
98f2ed6
Fix typo
Dec 3, 2018
588d711
Use ContextKey
Dec 3, 2018
9db48bf
Add cast
Dec 3, 2018
bce5cef
Don't use function alias
Dec 3, 2018
b6b44c4
Cr fixes
Dec 4, 2018
6cbfdc4
Reduce cyclic complexity
Dec 5, 2018
b588096
Proper multipart and header handling
Dec 14, 2018
8917d14
Make linter happy
Dec 17, 2018
3300890
Fix printf
Dec 17, 2018
2e6aaa9
Balancing (#107)
mjarco Jan 9, 2019
f8ad474
Extract db related methods to separate module so they can be reused.
Jan 9, 2019
826825f
Add indexes for faster queries during object synchronization
Jan 10, 2019
9b62721
Add watchdog metrics
Jan 10, 2019
65c5437
Fix IDE renames
Jan 10, 2019
bea83d4
Add the version header
Jan 10, 2019
ca1526a
Remove 'req' prefix from watchdog metrics
Jan 10, 2019
db4af71
Fix log message
Jan 10, 2019
8dfcd55
Add explicit table name, set logger
Jan 10, 2019
6177b9e
Make fields public.
Jan 10, 2019
125ac5d
Add comments for exported symbols.
Jan 11, 2019
2c1f7cb
Test fix.
Jan 11, 2019
42d3d3d
Merge branches 'v1.0' and 'watchdog' of https://github.com/allegro/ak…
Jan 11, 2019
58e666f
Merge pull request #113 from allegro/watchdog
Jan 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: go

go:
- 1.8
- 1.9
- "1.10"

install:
- go get github.com/Masterminds/glide
32 changes: 27 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
VERSION := `cat VERSION`
VERSION := `git log -n 1 | grep commit | sed 's/commit //g' | head -n 1`
LDFLAGS := -X main.version=$(VERSION)
GO := "$(GOROOT)/bin/go"

all: lint test build
all: vars formatting lint test build

vars:
@echo "====== Makefile internal variables:"
@echo "VERSION: '$(VERSION)'"
@echo "LDFLAGS: '$(LDFLAGS)'"
@echo "GO: '$(GO)'"
@echo "======\n\n"

linux: vars formatting lint test
GOOS=linux $(GO) build -v -ldflags "$(LDFLAGS)" -tags 'netcgo=1'.

formatting:
$(GO) get golang.org/x/tools/cmd/goimports

lint: deps-lint
gometalinter ./... \
--disable=gotype \
--disable=dupl \
--disable=gosec \
--deadline=600s \
--enable=goimports \
--disable=goimports \
--vendor \
--fast
--fast

lint-slow: deps-lint
gometalinter ./... \
--disable=gotype \
--disable=dupl \
--deadline=600s \
--enable=goimports \
--vendor

deps:
$(GO) get github.com/Masterminds/glide
Expand All @@ -21,7 +43,7 @@ deps-lint: deps
$(GO) get github.com/alecthomas/gometalinter
gometalinter --install

build: deps lint
build: vars deps lint
# Enable netcgo, then name resolution will use systems dns caches
$(GO) build -v -ldflags "$(LDFLAGS)" -tags 'netcgo=1'.

Expand Down
125 changes: 81 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
Akubra is a simple solution to keep an independent S3 storages in sync - almost
realtime, eventually consistent.

Keeping synchronized storage clusters, which handles great volume of new objects
(about 300k obj/h), is the most efficient by feeding them with all incoming data
Keeping synchronized storage clusters, which handles great volume of new objects,
is the most efficient by feeding them with all incoming data
at once. That's what Akubra does, with a minimum memory and cpu footprint.

Synchronizing S3 storages offline is almost impossible with a high volume traffic.
Expand All @@ -37,6 +37,11 @@ It also backtracks to older cluster when requested for not existing object on
target cluster. This kind of events are logged, so it's possible to rebalance
clusters in background.

### Multi cloud cost optimization
While all objects has to be written in every storage from shard, not all storages
has to be read. With load balancing and storage prioritization akubra will peak
cheapest one.

## Build

### Prerequisites
Expand Down Expand Up @@ -93,47 +98,65 @@ the pool and error is logged.
Configuration is read from a YAML configuration file with the following fields:

```yaml
# Listen interface and port e.g. "127.0.0.1:9090", ":80"
Listen: ":8080"
# Technical endpoint interface
TechnicalEndpointListen: ":8071"
# Technical health check endpoint (for load balancers)
HealthCheckEndpoint: "/status/ping"
# Additional not AWS S3 specific headers proxy will add to original request
AdditionalRequestHeaders:
'Cache-Control': "public, s-maxage=600, max-age=600"
'X-Akubra-Version': '0.9.26'
# Additional headers added to backend response
AdditionalResponseHeaders:
'Access-Control-Allow-Origin': "*"
'Access-Control-Allow-Credentials': "true"
'Access-Control-Allow-Methods': "GET, POST, OPTIONS"
'Access-Control-Allow-Headers': "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type"
# MaxIdleConns see: https://golang.org/pkg/net/http/#Transport
# Default 0 (no limit)
MaxIdleConns: 0
# MaxIdleConnsPerHost see: https://golang.org/pkg/net/http/#Transport
# Default 100
MaxIdleConnsPerHost: 100
# IdleConnTimeout see: https://golang.org/pkg/net/http/#Transport
# Default 0 (no limit)
IdleConnTimeout: 0s
# ResponseHeaderTimeout see: https://golang.org/pkg/net/http/#Transport
# Default 5s
ResponseHeaderTimeout: 5s
# DisableKeepAlives see: https://golang.org/pkg/net/http/#Transport
# Default false

DisableKeepAlives: false

# Maximum accepted body size
BodyMaxSize: "100M"
# Maximum number of incoming requests to process at once
MaxConcurrentRequests: 200
# Backend in maintenance mode. Akubra will skip this endpoint

# MaintainedBackends:
# - "http://s3.dc2.internal"
Service:
Server:
BodyMaxSize: 100MB
MaxConcurrentRequests: 200
# Listen interface and port e.g. "0:8000", "localhost:9090", ":80"
Listen: ":7082"
# Technical endpoint interface
TechnicalEndpointListen: ":7005"
# Health check endpoint (for load balancers)
HealthCheckEndpoint: "/status/ping"
Client:
# Additional not AWS S3 specific headers proxy will add to original request
AdditionalResponseHeaders:
'Access-Control-Allow-Origin': "*"
'Access-Control-Allow-Credentials': "true"
'Access-Control-Allow-Methods': "GET, POST, OPTIONS"
'Access-Control-Allow-Headers': "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-CSRFToken"
'Cache-Control': "public, s-maxage=600, max-age=600"
# Additional headers added to backend response
AdditionalRequestHeaders:
'Cache-Control': "public, s-maxage=600, max-age=600"
# Backends in maintenance mode
# MaintainedBackends:
# - "http://s3.dc2.internal"
# List request methods to be logged in synclog in case of backend failure
SyncLogMethods:
- GET
- PUT
- DELETE
# Transports rules with dedicated timeouts
Transports:
-
Name: TransportDef-Method:GET|POST
Rules:
Method: GET|POST
Path: .*
Properties:
MaxIdleConns: 200
MaxIdleConnsPerHost: 1000
IdleConnTimeout: 2s
ResponseHeaderTimeout: 5s
-
Name: TransportDef-Method:GET|POST|PUT
Rules:
Method: GET|POST|PUT
QueryParam: acl
Properties:
MaxIdleConns: 200
MaxIdleConnsPerHost: 500
IdleConnTimeout: 5s
ResponseHeaderTimeout: 5s
-
Name: OtherTransportDefinition
Rules:
Properties:
MaxIdleConns: 300
MaxIdleConnsPerHost: 600
IdleConnTimeout: 2s
ResponseHeaderTimeout: 2s

# List request methods to be logged in synclog in case of backend failure
SyncLogMethods:
Expand Down Expand Up @@ -212,7 +235,7 @@ It's configured with TechnicalEndpointListen property.

### Example usage

curl -vv -X POST -H "Content-Type: application/yaml" --data-binary @akubra.cfg.yaml http://127.0.0.1:8071/validate/configuration
curl -vv -X POST -H "Content-Type: application/yaml" --data-binary @akubra.cfg.yaml http://127.0.0.1:8071/configuration/validate

Possible responses:

Expand Down Expand Up @@ -240,6 +263,20 @@ Response:
< Content-Length: 2
OK

## Transports and Rules with dedicated timeouts

This feature guarantees high availability and better transmission.

For example, when one specific HTTP method has lag we can set timeouts with special 'Rule'.
Another example, when user adds big chunks by multi upload,
default timeout needs to be changed with dedicated 'Transport' with 'Rule' for this case.

We have 'Rules' for 'Transports' definitions:
- required minimum one item in 'Transports' section
- required empty or one property (Method, Path, QueryParam) in 'Rules' section
- if 'Rules' section is empty, the transport will match any requests
- when transport cannot be matched, http 500 error code will be sent to client.

## Limitations

* User's credentials have to be identical on every backend
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Loading