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

인프라 관점에서 접근하는 리디스토리 개발기

RIDI
September 08, 2017

인프라 관점에서 접근하는 리디스토리 개발기

발표자: 스토리팀 박준형

RIDI

September 08, 2017
Tweet

More Decks by RIDI

Other Decks in Programming

Transcript

  1. ߅ળഋ - 6֙ର ѐߊ੗ - C / C++ ࡅ -

    ݃ࣗ ࡅ - ਦب਋ ୭Ҋ 2 ߊ಴੗ ࣗѐ
  2. 3 ૑Әө૑ ࣚ؂Ѫ - Linux ਽ਊ೐۽Ӓ۔ - MFC ਽ਊ೐۽Ӓ۔ -

    WPF ਽ਊ೐۽Ӓ۔ - Reverse proxy - ܻ٣࠘झ - ܻ٣झషܻ
  3. 11 ഥਗ: ౱ਗ 4ݺ - ࠺زӝ ੘স - Celery ܳ

    ੋझఢझীࢲ э੉ جܻ੗. - Queueח Rabbit MQо ੉઺ചی Fail overо য۵֎. - Session ٸޙী Redis ॶԁפө Redisী Queue ৉ೡب ઱੗. - Redis Fail overח Sentinel ۽ ೞ੗. - WAS 2ѐ - Redis 2ѐ - DB Multi-AZ
  4. 13 ഥਗ: ౱ਗ 6ݺ - DB ܻ࠙ - Master DBח

    ࣗ઺ೞפө Slaveܳ ࠢ੉੗. - DB reqب оמೞݶ Slave۽ оب۾ ѐߊೞ੗. - Log ؘ੉ఠա ੍਷ ӝ۾ ؘ੉ఠח प ࢲ࠺झ৬ ޖҙೞפө લ؊ۄب ഒ੗ લਵۄҊ DB ܳ ܻ࠙ೞ੗. - ޛۿ Log, ੍ӝ ӝ۾਷ ੢গо ੓যب ࢲ࠺झ ੉ਊী ର૕੉ হب۾ ѐߊೞ੗ - WAS 2ѐ, Redis 2ѐ - DB Multi-AZ, Slave 1ѐ, Log DB, Reading DB
  5. 15 ഥਗ: ࢎղ 10ݺ - ࠭যࢲߡ - ࠭য పझ౟ܳ ਤ೧

    ࠭য ࢲߡܳ ୶оೞ੗. - ӝઓ੄ ࠘झ ࢲߡܳ оઉ৬ࢲ ѐઑೞ੗. - ࠗೞо ߹۽ হਸѪ эӟ ೠؘ ׮ܲ ঱যפө ٮ۽ ࢲߡܳ ف੗. - ё୓ ੷੢ - EPUB җ ੉޷૑, ز৔࢚ਸ ੷੢೧ঠ ೞחؘ S3ী ೞ੗. - EPUB਷ ઺ਃೞפө ੉޷૑৬ ز৔࢚җ ٮ۽ ੷੢ೞ੗. - WAS 2ѐ, View WAS 2ѐ, Redis 2ѐ - DB Multi-AZ, Slave 1ѐ, Log DB, Reading DB, - S3
  6. 17 ഥਗ: ࢎղ 15ݺ - CDN - ޷٣য(੉޷૑, ز৔࢚)ח ֢୹غب

    ࢚ҙ হҊ ੹࣠੉ ࡈۄঠ ೞפө খী CDNਸ ف੗. - JSی CSSب CDNਸ ੉ਊೞ੗. - TTL ҙܻ ೞӝ য۰਋פ ݽٚ ౵ੌ਷ ࠛ߸ਵ۽ р઱ೞ੗. - WAS 2ѐ, View WAS 2ѐ, Redis 2ѐ - DB Multi-AZ, Slave 1ѐ, Log DB, Reading DB - S3, CloudFront
  7. 20 ഥਗ: 5,000ݺ - Worker - ӝ׮ܻݶ ޖܐ, ୭नಞ ঌܿ

    ١੉ ࠺زӝ Queueী ऺৈࢲ оՔ ןѱ غ֎. - पदрࢿ ੘সٜ਷ ੹ਊ Workerীࢲ جܻ੗ - Cronب Ӓ Workerо جܻ੗. - ݽפఠ݂ب ೧ঠ ೞחؘ CloudWatchী োѾೞ੗. - ߓನ੹ పझ౟ب ೧ঠ ೞפө Stagingࢲߡب ೞա ٜ݅੗. - WAS 2ѐ, Worker 1ѐ, Staging 1ѐ, View WAS 4ѐ, Redis 2ѐ - DB Multi-AZ, Slave 1ѐ, Log DB, Reading DB - S3, CloudFront, CloudWatch
  8. 22 ഥਗ: 1݅ݺ - ઑഥ ੹ਊ DB - DBо ੗Բ

    લ֎. - ਍৔, ੤ޖ౱ীࢲ ࢲ࠺झ ࠙ࢳਸ ਤ೧ ষ୒դ Queryܳ զܻҊ ੓֎. - DBੋझఢझо ৈ۞ѐۄࢲ ࠙ࢳ੉ ࠛಞೞ֎. - ઑഥ ੹ਊ DBܳ ٜ݅যࢲ ࢲ࠺झ৬ ܻ࠙ ೞҊ ݽٚ DBܳ Replicationೞ੗. - WAS 2ѐ, Worker 1ѐ, Staging 1ѐ, View WAS 4ѐ, Redis 2ѐ - DB Multi-AZ, Slave 1ѐ, Log DB, Reading DB, Read DB - S3, CloudFront, CloudWatch
  9. 24 ഥਗ: 5݅ݺ - ࠭য ࢲߡ ѐࢶ - ࢸզী ର۹૑ղ׮о

    ࠭য ࢲߡ લ঻֎. - оՔ оՔ ࠭য ࢲߡ લ֎. - ݅ച ࢲ࠺झ ೧ঠ ೞחؘ ੉؀۽ оݶ উغѷ֎. - EPUB਷ ࠛ߸੉פө ࠭যࢲߡо S3ী ౵यೠ ؘ੉ఠܳ ੷੢ೞҊ CDN క਋੗. - ੋૐ ӝמ਷ CloudFront੄ Private contents ӝמਸ ࢎਊೞ੗. - WAS 2ѐ, Worker 1ѐ, Staging 1ѐ, View WAS 2ѐ, Redis 2ѐ - DB Multi-AZ, Slave 1ѐ, Log DB, Reading DB, Read DB - S3, CloudFront, CloudWatch
  10. 26 ഥਗ: 10݅ݺ - ElasticCache - оՔ Redis োѾ੉ ՐӝҊ

    ਍৔ೞӝ ߣѢ܂֎. - ਍৔࠺ਊب ݆੉ ର੉ উաפө ElasticCache о੗. - Push Worker - ੹୓ Push ࠁղ۰פө ցޖ וܻ׮. ؀۝ߊ࣠਷ SNSॳ੗. - ࢎۈ ݆ই૑פө ӝ׮ޖ ঌܿߊ࣠ب ࡆࣁ׮. Push ੹ਊ Worker. - ࢲ࠺झ Scale out - ੹୓ Push ੗઱ ࠁղפө DBࠗೞо ழ૑֎. Slave୶о. - DB Slave୶оೞפө WASલ֎. WAS ૐо. - WASૐоೞפө ۽Ӓ ࠁӝ য۵׮. ۽Ӓ ࣻ૘ӝ ୶о. - WAS 8ѐ, Worker 2ѐ, Staging 2ѐ, View WAS 2ѐ, ۽Ӓ ࣻ૘ӝ - DB Multi-AZ, Slave 2ѐ, Log DB, Reading DB, Read DB - S3, CloudFront, CloudWatch, ElasticCache, SNS
  11. 28 ഥਗ: 20݅ݺ - ੉޷૑ ୭੸ച - ੉޷૑ ׮਍۽٘о оՔ

    וܽѱ ੓֎. - ೳ! 30MB૞ܻ ॉ֎ੌ(?)੉׮. - ਍৔౱ীࢲ ঑୷ೞҊ ৢܽ׮Ҋ ೮૑݅, पࣻ ೡࣻ ੓ਵפ ٮ۽ ೧઱੗. - ݽٚ ੉޷૑ܳ ߸ജೞ૑ ݈Ҋ, ೙ਃೡ ٸ ਗೞח ২࣌ਵ۽ ߸ഋೡ ࣻ ੓ب۾ ೞ੗. - ੉ۡٸ Lambdaܳ ॳݶ ୭Ҋ. - WAS 8ѐ, Worker 2ѐ, Staging 2ѐ, View WAS 2ѐ, ۽Ӓ ࣻ૘ӝ - DB Multi-AZ, Slave 2ѐ, Log DB, Reading DB, Read DB - S3, CloudFront, CloudWatch, ElasticCache, SNS - Lambda, API Gateway
  12. 30 അ੤ - TDD - ߓನ݅ ೞݶ য়ܨ աҊ ੢গо

    ߊࢤೞ֎. - పझ౟ী दрب য়ې ѦܻҊ, ־ۅغח పझ౟ب ੓Ҋ. - CI ی API tester ୶о - ࠺ਊ ޙઁ۽ CloudFlare৬ CloudFront۽ CDN ੉઺ച - WAS 8ѐ, Worker 2ѐ, Staging 2ѐ, View WAS 2ѐ, ۽Ӓ ࣻ૘ӝ - API tester, Travis CI - DB Multi-AZ, Slave 2ѐ, Log DB, Reading DB, Read DB - S3, CloudFlare, CloudFront, CloudWatch, ElasticCache, SNS - Lambda, API Gateway
  13. 32 ഥਗ: 100݅ݺ غӝ ੹ী ೡੌ - ߎী ࢎۈ উয়פө,

    ഑਷ ষ୒աѱ ৢ ࣻ ੓ਵפ Auto scailing - ߓನо ؊ एਕઉঠ ೞפө Front ৬ Backend ա־Ҋ Docker! - ࢶޛೣҗ ഥਗࣻ ૐо۽ DB ؘ੉ఠо ؊ ऺӝ ੹ী Sharding ળ࠺ - ౱ਗ טܻӝ