diff options
author | Valery Piashchynski <[email protected]> | 2021-03-02 18:59:43 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-02 18:59:43 +0300 |
commit | a93b4c429129037988e74de25b94829b142f213e (patch) | |
tree | 45aaf646652bb6ca58b96359ba0c86a9caa69f5e | |
parent | fadd95c45faf91feff65bf3c5b10900147c1f729 (diff) | |
parent | 56bb5beb23aaf3d79e9f870c85924c9d98dcfe8b (diff) |
Merge pull request #569 from spiral/feature/release_2.0.0v2.0.0
โกv2.0.0
-rwxr-xr-x | .rr.yaml | 12 | ||||
-rw-r--r-- | CHANGELOG.md | 24 | ||||
-rw-r--r-- | go.sum | 1 | ||||
-rwxr-xr-x | internal/protocol.go | 1 | ||||
-rw-r--r-- | pkg/doc/README.md | 2 | ||||
-rw-r--r-- | plugins/doc/graphviz.svg | 169 | ||||
-rwxr-xr-x | systemd/rr.service | 2 | ||||
-rw-r--r-- | tools/worker_table.go | 1 |
8 files changed, 36 insertions, 176 deletions
@@ -21,8 +21,9 @@ server: # optional for development logs: # default - mode: debug - encoding: json + mode: development + level: debug + encoding: console output: stderr err_output: stderr channels: @@ -34,7 +35,12 @@ logs: server: mode: production level: info - encoding: json + encoding: console + output: stderr + rpc: + mode: production + level: debug + encoding: console output: stderr # Workflow and activity mesh service diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f31aca3..64a2b590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,30 @@ CHANGELOG ========= +v2.0.0 (02.03.2021) +------------------- + +- โ๏ธ Added shared server to create PHP worker pools instead of isolated worker pool in each individual plugin. +- ๐ง New plugin system with auto-recovery, easier plugin API. +- ๐ New `logger` plugin to configure logging for each plugin individually. +- ๐ Up to 50% performance increase in HTTP workloads. +- โ๏ธ Added **[Temporal Workflow](https://temporal.io)** plugin to run distributed computations on scale. +- โ๏ธ Added `debug` flag to reload PHP worker ahead of request (emulates PHP-FPM behavior). +- โ Eliminated `limit` service, now each worker pool incluides `supervisor` configuration. +- ๐ New resetter, informer plugins to perform hot reloads and observe loggers in a system. +- ๐ซ Exposed more HTTP plugin configuration options. +- ๐ Headers, static and gzip services now located in HTTP config. +- ๐ Ability to configure the middleware sequence. +- ๐ฃ Faster Goridge protocol (eliminated 50% of syscalls). +- ๐พ Added support for binary payloads for RPC (`msgpack`). +- ๐ Server no longer stops when a PHP worker dies (attempts to restart). +- ๐พ New RR binary server downloader. +- ๐ฃ Echoing no longer breaks execution (yay!). +- ๐ Migration to ZapLogger instead of Logrus. +- ๐ฅ RR can no longer stuck when studding down with broken tasks in pipeline. +- ๐งช More tests, more static analysis. +- ๐ฅ Created a new foundation for new KV, WebSocket, GRPC and Queue plugins. + v2.0.0-RC.4 (20.02.2021) ------------------- @@ -562,7 +562,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201210223839-7e3030f88018/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091 h1:DMyOG0U+gKfu8JZzg2UQe9MeaC1X+xQWlAKcRnjxjCw= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210217105451-b926d437f341 h1:2/QtM1mL37YmcsT8HaDNHDgTqqFVw+zr8UzMiBVLzYU= golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/internal/protocol.go b/internal/protocol.go index 48c653a5..3257c1d9 100755 --- a/internal/protocol.go +++ b/internal/protocol.go @@ -67,6 +67,7 @@ func FetchPID(rl relay.Relay) (int64, error) { } frameR := frame.NewFrame() + err = rl.Receive(frameR) if !frameR.VerifyCRC() { return 0, errors.E(op, errors.Str("CRC mismatch")) diff --git a/pkg/doc/README.md b/pkg/doc/README.md index 4f726f4a..709df603 100644 --- a/pkg/doc/README.md +++ b/pkg/doc/README.md @@ -18,4 +18,4 @@ no workers in the `stack`, watcher waits for the specified via config (`allocate 7. Golang worker send that request to the PHP worker via various set of transports (`pkg/transport` package). 8. PHP worker send back response to the golang worker (or error via stderr). 9. Golang worker return response payload to the pool. -10. Pool process this response and return answer to the user.
\ No newline at end of file +10. Pool process this response and return answer to the user. diff --git a/plugins/doc/graphviz.svg b/plugins/doc/graphviz.svg deleted file mode 100644 index 86f6ab5c..00000000 --- a/plugins/doc/graphviz.svg +++ /dev/null @@ -1,169 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><!-- Generated by graphviz version 2.40.1 (20161225.0304) - --><!-- Title: endure Pages: 1 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="625pt" height="479pt" viewBox="0.00 0.00 624.94 478.79"> -<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 474.786)"> -<title>endure</title> -<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-474.786 620.9357,-474.786 620.9357,4 -4,4"/> -<!-- checker --> -<g id="node1" class="node"> -<title>checker</title> -<ellipse fill="none" stroke="#000000" cx="412.2429" cy="-377.2862" rx="41.1103" ry="18"/> -<text text-anchor="middle" x="412.2429" y="-373.0862" font-family="Times,serif" font-size="14.00" fill="#000000">checker</text> -</g> -<!-- config --> -<g id="node2" class="node"> -<title>config</title> -<ellipse fill="none" stroke="#000000" cx="463.8878" cy="-235.393" rx="35.9154" ry="18"/> -<text text-anchor="middle" x="463.8878" y="-231.193" font-family="Times,serif" font-size="14.00" fill="#000000">config</text> -</g> -<!-- checker->config --> -<g id="edge1" class="edge"> -<title>checker->config</title> -<path fill="none" stroke="#000000" d="M418.7837,-359.3154C427.6313,-335.0068 443.4953,-291.4209 453.8554,-262.9568"/> -<polygon fill="#000000" stroke="#000000" points="457.2687,-263.812 457.4,-253.218 450.6908,-261.4178 457.2687,-263.812"/> -</g> -<!-- logger --> -<g id="node3" class="node"> -<title>logger</title> -<ellipse fill="none" stroke="#000000" cx="35.7071" cy="-310.8928" rx="35.9154" ry="18"/> -<text text-anchor="middle" x="35.7071" y="-306.6928" font-family="Times,serif" font-size="14.00" fill="#000000">logger</text> -</g> -<!-- checker->logger --> -<g id="edge2" class="edge"> -<title>checker->logger</title> -<path fill="none" stroke="#000000" d="M374.0665,-370.5547C303.7112,-358.1492 154.0014,-331.7513 79.586,-318.6299"/> -<polygon fill="#000000" stroke="#000000" points="80.0574,-315.1591 69.6015,-316.8693 78.8418,-322.0527 80.0574,-315.1591"/> -</g> -<!-- logger->config --> -<g id="edge4" class="edge"> -<title>logger->config</title> -<path fill="none" stroke="#000000" d="M69.6636,-304.9054C146.6435,-291.3317 334.3698,-258.2305 420.0048,-243.1308"/> -<polygon fill="#000000" stroke="#000000" points="420.6875,-246.5645 429.9277,-241.3811 419.4719,-239.6708 420.6875,-246.5645"/> -</g> -<!-- gzip --> -<g id="node4" class="node"> -<title>gzip</title> -<ellipse fill="none" stroke="#000000" cx="531.6651" cy="-102.393" rx="27.8286" ry="18"/> -<text text-anchor="middle" x="531.6651" y="-98.193" font-family="Times,serif" font-size="14.00" fill="#000000">gzip</text> -</g> -<!-- headers --> -<g id="node5" class="node"> -<title>headers</title> -<ellipse fill="none" stroke="#000000" cx="576.4118" cy="-235.393" rx="40.548" ry="18"/> -<text text-anchor="middle" x="576.4118" y="-231.193" font-family="Times,serif" font-size="14.00" fill="#000000">headers</text> -</g> -<!-- headers->config --> -<g id="edge3" class="edge"> -<title>headers->config</title> -<path fill="none" stroke="#000000" d="M535.788,-235.393C527.3742,-235.393 518.4534,-235.393 509.8639,-235.393"/> -<polygon fill="#000000" stroke="#000000" points="509.607,-231.8931 499.607,-235.393 509.607,-238.8931 509.607,-231.8931"/> -</g> -<!-- metrics --> -<g id="node6" class="node"> -<title>metrics</title> -<ellipse fill="none" stroke="#000000" cx="412.2429" cy="-93.4998" rx="39.4196" ry="18"/> -<text text-anchor="middle" x="412.2429" y="-89.2998" font-family="Times,serif" font-size="14.00" fill="#000000">metrics</text> -</g> -<!-- metrics->config --> -<g id="edge6" class="edge"> -<title>metrics->config</title> -<path fill="none" stroke="#000000" d="M418.7837,-111.4707C427.6313,-135.7792 443.4953,-179.3651 453.8554,-207.8292"/> -<polygon fill="#000000" stroke="#000000" points="450.6908,-209.3682 457.4,-217.5681 457.2687,-206.974 450.6908,-209.3682"/> -</g> -<!-- metrics->logger --> -<g id="edge5" class="edge"> -<title>metrics->logger</title> -<path fill="none" stroke="#000000" d="M387.5373,-107.7636C321.7958,-145.7194 142.5487,-249.2078 68.4432,-291.9926"/> -<polygon fill="#000000" stroke="#000000" points="66.4391,-289.1082 59.5289,-297.1393 69.9391,-295.1704 66.4391,-289.1082"/> -</g> -<!-- redis --> -<g id="node7" class="node"> -<title>redis</title> -<ellipse fill="none" stroke="#000000" cx="281.4734" cy="-18" rx="29.6127" ry="18"/> -<text text-anchor="middle" x="281.4734" y="-13.8" font-family="Times,serif" font-size="14.00" fill="#000000">redis</text> -</g> -<!-- redis->config --> -<g id="edge8" class="edge"> -<title>redis->config</title> -<path fill="none" stroke="#000000" d="M295.1841,-34.3398C326.9308,-72.174 405.6399,-165.9759 443.2445,-210.7914"/> -<polygon fill="#000000" stroke="#000000" points="440.6581,-213.1541 449.7672,-218.5648 446.0204,-208.6545 440.6581,-213.1541"/> -</g> -<!-- redis->logger --> -<g id="edge7" class="edge"> -<title>redis->logger</title> -<path fill="none" stroke="#000000" d="M267.9098,-34.1644C227.1471,-82.7435 105.5381,-227.6715 56.5241,-286.0841"/> -<polygon fill="#000000" stroke="#000000" points="53.5843,-284.1426 49.8376,-294.0528 58.9466,-288.6421 53.5843,-284.1426"/> -</g> -<!-- reload --> -<g id="node8" class="node"> -<title>reload</title> -<ellipse fill="none" stroke="#000000" cx="281.4734" cy="-452.786" rx="35.3315" ry="18"/> -<text text-anchor="middle" x="281.4734" y="-448.586" font-family="Times,serif" font-size="14.00" fill="#000000">reload</text> -</g> -<!-- reload->config --> -<g id="edge10" class="edge"> -<title>reload->config</title> -<path fill="none" stroke="#000000" d="M295.4842,-436.0885C327.4495,-397.9939 405.8819,-304.5217 443.3335,-259.8887"/> -<polygon fill="#000000" stroke="#000000" points="446.0824,-262.0576 449.8292,-252.1474 440.7201,-257.5581 446.0824,-262.0576"/> -</g> -<!-- reload->logger --> -<g id="edge9" class="edge"> -<title>reload->logger</title> -<path fill="none" stroke="#000000" d="M257.9083,-439.1807C213.6848,-413.6483 118.2025,-358.5216 68.0211,-329.5493"/> -<polygon fill="#000000" stroke="#000000" points="69.6111,-326.4259 59.2009,-324.457 66.1111,-332.4881 69.6111,-326.4259"/> -</g> -<!-- resetter --> -<g id="node9" class="node"> -<title>resetter</title> -<ellipse fill="none" stroke="#000000" cx="132.7678" cy="-426.5652" rx="39.3984" ry="18"/> -<text text-anchor="middle" x="132.7678" y="-422.3652" font-family="Times,serif" font-size="14.00" fill="#000000">resetter</text> -</g> -<!-- reload->resetter --> -<g id="edge11" class="edge"> -<title>reload->resetter</title> -<path fill="none" stroke="#000000" d="M248.1009,-446.9016C227.9026,-443.3401 201.8366,-438.7439 179.5962,-434.8224"/> -<polygon fill="#000000" stroke="#000000" points="180.1376,-431.3639 169.6817,-433.0742 178.922,-438.2575 180.1376,-431.3639"/> -</g> -<!-- resetter->logger --> -<g id="edge12" class="edge"> -<title>resetter->logger</title> -<path fill="none" stroke="#000000" d="M118.4461,-409.4974C102.0084,-389.9077 74.9173,-357.6218 56.2379,-335.3605"/> -<polygon fill="#000000" stroke="#000000" points="58.881,-333.0653 49.7719,-327.6546 53.5187,-337.5649 58.881,-333.0653"/> -</g> -<!-- rpc --> -<g id="node10" class="node"> -<title>rpc</title> -<ellipse fill="none" stroke="#000000" cx="132.7678" cy="-44.2208" rx="27" ry="18"/> -<text text-anchor="middle" x="132.7678" y="-40.0208" font-family="Times,serif" font-size="14.00" fill="#000000">rpc</text> -</g> -<!-- rpc->config --> -<g id="edge13" class="edge"> -<title>rpc->config</title> -<path fill="none" stroke="#000000" d="M153.4808,-56.1795C209.3277,-88.4227 363.359,-177.3527 431.1448,-216.4889"/> -<polygon fill="#000000" stroke="#000000" points="429.7078,-219.7006 440.1181,-221.6696 433.2078,-213.6384 429.7078,-219.7006"/> -</g> -<!-- rpc->logger --> -<g id="edge14" class="edge"> -<title>rpc->logger</title> -<path fill="none" stroke="#000000" d="M126.3994,-61.7179C109.8827,-107.097 65.5725,-228.8383 45.6502,-283.5745"/> -<polygon fill="#000000" stroke="#000000" points="42.3576,-282.3876 42.2262,-292.9816 48.9354,-284.7818 42.3576,-282.3876"/> -</g> -<!-- static --> -<g id="node11" class="node"> -<title>static</title> -<ellipse fill="none" stroke="#000000" cx="35.7071" cy="-159.8932" rx="31.3333" ry="18"/> -<text text-anchor="middle" x="35.7071" y="-155.6932" font-family="Times,serif" font-size="14.00" fill="#000000">static</text> -</g> -<!-- static->config --> -<g id="edge15" class="edge"> -<title>static->config</title> -<path fill="none" stroke="#000000" d="M65.8159,-165.2022C140.1736,-178.3135 332.7753,-212.2743 419.9157,-227.6396"/> -<polygon fill="#000000" stroke="#000000" points="419.5489,-231.1288 430.0048,-229.4185 420.7645,-224.2351 419.5489,-231.1288"/> -</g> -<!-- static->logger --> -<g id="edge16" class="edge"> -<title>static->logger</title> -<path fill="none" stroke="#000000" d="M35.7071,-178.1073C35.7071,-204.0691 35.7071,-251.9543 35.7071,-282.5696"/> -<polygon fill="#000000" stroke="#000000" points="32.2072,-282.6141 35.7071,-292.6141 39.2072,-282.6142 32.2072,-282.6141"/> -</g> -</g> -</svg>
\ No newline at end of file diff --git a/systemd/rr.service b/systemd/rr.service index 6e4d5914..9b78329e 100755 --- a/systemd/rr.service +++ b/systemd/rr.service @@ -3,7 +3,7 @@ Description=High-performance PHP application server [Service] Type=simple -ExecStart=/usr/local/bin/roadrunner serve -v -d -c <path/to/.rr.yaml> +ExecStart=/usr/local/bin/roadrunner serve -c <path/to/.rr.yaml> Restart=always RestartSec=30 diff --git a/tools/worker_table.go b/tools/worker_table.go index 20b8084f..157aa972 100644 --- a/tools/worker_table.go +++ b/tools/worker_table.go @@ -48,7 +48,6 @@ func renderStatus(status string) string { case "errored": return color.RedString("errored") } - return status } |