Upgrade to Pro — share decks privately, control downloads, hide ads and more …

try! Swift Tokyo 2018: Best Docker Container in Swift

try! Swift Tokyo 2018: Best Docker Container in Swift

D390d62a9772cf2e0bd8000157abbff8?s=128

Takeshi Ihara

March 01, 2018
Tweet

More Decks by Takeshi Ihara

Other Decks in Programming

Transcript

  1. Best Docker Container in Swift  USZ4XJGU$POGFSFODF 5BLFTIJ*IBSB

  2. Swift on Linux 1. Ubuntu 14.x and 16.x 2. Server

    Side Swift 3. Docker
  3. Docker Images (Build) • vapor-build:16.04 └─ docker-swift-build:16.04 └─ ubuntu:16.04(LTS) •

    vapor-build:14.04 └─ docker-swift-build:14.04 └─ ubuntu:14.04(LTS)
  4. Docker Images (Build) • vapor-build:16.04 └─ docker-swift-build:16.04 └─ ubuntu:16.04(LTS) •

    vapor-build:14.04 └─ docker-swift-build:14.04 └─ ubuntu:14.04(LTS)
  5. Docker Images (Build) • vapor-build:16.04 └─ docker-swift-build:16.04 └─ ubuntu:16.04(LTS) •

    vapor-build:14.04 └─ docker-swift-build:14.04 └─ ubuntu:14.04(LTS)
  6. Docker Images (Run) • vapor-server:16.04 └─ docker-swift:16.04 └─ ubuntu:16.04(LTS) •

    vapor-server:14.04 └─ docker-swift:14.04 └─ ubuntu:14.04(LTS)
  7. Docker Images (Run) • vapor-server:16.04 └─ docker-swift:16.04 └─ ubuntu:16.04(LTS) •

    vapor-server:14.04 └─ docker-swift:14.04 └─ ubuntu:14.04(LTS)
  8. Docker Images (Run) • vapor-server:16.04 └─ docker-swift:16.04 └─ ubuntu:16.04(LTS) •

    vapor-server:14.04 └─ docker-swift:14.04 └─ ubuntu:14.04(LTS)
  9. Benchmark 4FSWFS $MJFOU .BDIJOF &$DMBSHF &$UNJDSP "QQMJDBUJPO 4XJGU7BQPS "QBDIF#FODI

  10. 5JNF TFD      3FRVFTU  

       GET Concurrency = 10
  11. GET Concurrency = 100 & 1000 5JNF TFD  

       3FRVFTU $PODVSSFODZ      5JNF TFD      3FRVFTU $PODVSSFODZ    
  12. 5JNF TFD      3FRVFTU  

       POST Concurrency = 10
  13. 5JNF TFD      3FRVFTU $PODVSSFODZ 

       5JNF TFD      3FRVFTU $PODVSSFODZ      POST Concurrency = 100 & 1000
  14. Docker Images (Build) 6CVOUV EPDLFSTXJGU CVJME WBQPSCVJME  .# (#

     .# (# .#  .# (# .# (# .#
  15. Docker Images (Run) 6CVOUV EPDLFSTXJGU WBQPSTFSWFS  .# .# .#

    (# .#  .# .# .# (# .# ˣ.#
  16. Summary • Each Dockerfile for build and run • nonchalant/docker-swift-build

    • nonchalant/docker-swift • Currently, Ubuntu 16.04 is best • Ubuntu 18.04 (LTS) will be better?
  17. Thank you ⚡ • Twitter: @nonchalant0303 • GitHub: @Nonchalant •

    https://github.com/Nonchalant/ docker-swift-benchmark