<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Edward J. Yoon on Medium]]></title>
        <description><![CDATA[Stories by Edward J. Yoon on Medium]]></description>
        <link>https://medium.com/@edwardjyoon?source=rss-58b3a159142c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b84BQ9bKfNWmi1EJGzrFFg.jpeg</url>
            <title>Stories by Edward J. Yoon on Medium</title>
            <link>https://medium.com/@edwardjyoon?source=rss-58b3a159142c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:41:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@edwardjyoon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GreenCar 데이터-기반 플랫폼으로의 진화]]></title>
            <link>https://medium.com/@edwardjyoon/greencar-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EA%B8%B0%EB%B0%98-%ED%94%8C%EB%9E%AB%ED%8F%BC%EC%9C%BC%EB%A1%9C%EC%9D%98-%EC%A7%84%ED%99%94-950f1751e334?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/950f1751e334</guid>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Thu, 16 Jul 2020 07:36:49 GMT</pubDate>
            <atom:updated>2020-07-16T07:36:49.830Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. 먼저 클라우드 이전!</h3><p>카셰어링 서비스 그린카에 인터넷 서비스를 맡고 있는 플랫폼본부는 현재 UX, 마케팅실, 그리고 기술개발실로 구성되어있습니다.</p><p>고객들이 매번 새로운 차를 타도 나를 위한 편안한 차로 인식 할 수 있는 UX 사용자 경험, 그리고 전국의 모든 공유 차량의 정보가 클라우드에 저장∙분석되고 연결할 수 있는 환경에서 다양한 데이터 중심의 연구 개발과 데이터 드리븐 퍼포먼스 마케팅을 수행하고 있죠.</p><p>이들의 마일스톤의 첫 번째 여정이던 클라우드 이전이 드디어 오늘 새벽 6시에 진행되었으며 성공적으로 라이브 트래픽을 받고 있습니다. :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DsAx4chNmKFS3VAWJKVK8A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y_iUQyFckvJUPZ4hR3Znyg.jpeg" /><figcaption>2020–02–26 클라우드 이삿날 일찍들 출근하신 기술개발실 파트 리더들</figcaption></figure><p>클라우드라는것이 이미 대중화 되었고 이전 자체가 대단하진 않지만 개발 환경의 확장성과 미래를 위한 기반으로써 의의는 결코 적지 않습니다. 그렇기 때문에 역사적인 순간으로 생각합니다!</p><p>이후 어느 정도 안정성이 검증되면, 그린카 3.0 UX 개선 프로젝트와 함께 기술개발실은 데이터 수집과 Strangler Pattern 디자인으로 재설계. 기술부채 해결과 백오피스 고도화는 물론 Dynamic Pricing과 같은 다양한 도전적 과제를 수행할 계획을 가지고 있습니다.</p><h3>2. 데이터 기반의 플랫폼</h3><p>저희는 온라인 예약 카셰어링을 넘어 모빌리티 서비스 플랫폼으로써의 진화를 꿈꾸고 있습니다. 만족할만한 서비스를 제공하기 위해 우버의 Surge Pricing 모델과 같이 “이동”의 수요 공급을 데이터로 이해하고 대규모 이동 수요에 따라 서비스 품질을 잃지 않는 “데이터 기반의 플랫폼”에 집중하고 있습니다.</p><p>가령, 그린카는 수 백만의 고객과 수 천대의 공유차를 가지고 있습니다. 수요 공급의 실시간 변화에 따른 가격 정책은 인위적이거나 고정적이기 어렵습니다. 유한한 자원을 공유하며 소비한다는 관점에서, 소비자의 수요와 공급량이 일치하는 평형 시장 가격을 유지할 수 있어야 더 가치있는 이용객의 이동 수요로 할당 될 수 있다는 것이죠!</p><p>데이터 중심의 마케팅 활동 또한 상품과 혜택 설계에 기반이되며 이는 전반적인 서비스 만족도와 재사용을 높이기 위해 노력하고 있습니다.</p><p>다양하게 도입한 데이터 분석 솔루션과 기술을 적극 활용하여 온/오프라인 사용자 경험의 개선, 새로운 상품과 혜택 설계, 그리고 운영 최적화의 범위에서의 인공지능 프로젝트를 진행하면서 진화하는 그린카의 서비스!</p><p>앞으로도 많이 기대해주세요.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=950f1751e334" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[데이터-중심 문화를 위한 팀 구축 전략]]></title>
            <link>https://medium.com/spoontech/%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%A4%91%EC%8B%AC-%EB%AC%B8%ED%99%94%EB%A5%BC-%EC%9C%84%ED%95%9C-%ED%8C%80-%EA%B5%AC%EC%B6%95-%EC%A0%84%EB%9E%B5-d09200b78eca?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d09200b78eca</guid>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Mon, 07 Jan 2019 13:32:51 GMT</pubDate>
            <atom:updated>2019-01-08T01:08:54.061Z</atom:updated>
            <content:encoded><![CDATA[<p>데이터는 기업에 꾸준한 통찰력을 공급하고 인터넷 서비스와 브랜드가 지속적으로 성장할 수 있도록 돕는 중요한 연료로 표현된다. 그러나 이제 더 이상 데이터의 중요성을 더 설명하거나 강조할 필요가 없을 만큼 오늘날 데이터-중심 기업의 성공 사례는 너무나도 많기 때문에 … 이 글에서는 우리가 어떻게 준비를 하고 팀을 조직화해서 운영할 수 있는지에 대해 몇 가지 소개 해본다.</p><p>제일 먼저 Think with Google 공식 블로그를 보면 데이터 팀 구축에 대한 3 가지 모델이 소개되어 있다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJZuhzlZdYBAhLRqQgJ5YQ.png" /><figcaption>중앙 모델, 분산 모델, 그리고 허브-앤-스포크 모델</figcaption></figure><p>첫번째 모델은 중앙에 우수한 팀을 만들어두고 일관된 지침, 도구 및 프로세스를 센터에서 실행하는 방식이다. 단점은 역시 사업 전반에 걸쳐 여러 팀이 가지고 있는 다양한 데이터 요구사항을 잘 처리하지 못하는 점이다.</p><p>두번째 모델은 분산된 팀 모델로 분석 팀을 회사 전반의 각 부서에 배치하는 방법이다. 이 구조는 각 팀이 보다 유연 해지고, 필요에 따라 전술적인 변화를 가능하게 한다고 한다. 단점으로는 큰 그림을 놓칠 수 있고 Data가 siloed 될 수 있다는 점이다.</p><p>세번째 모델은 허브-앤-스포크 (허브는 바퀴, 스포크는 바퀴살이란 의미다). 위 두 가지 모델을 혼합한 하이브리드 형식으로 중앙에 우수한 팀을 만들어 두고 개별 부서의 분석가와 상호 소통케 하는 협업 클러스터 모델이다.</p><p>Netflix의 데이터 팀 구조 경우, 중앙 모델 보다는 “Highly aligned, loosely coupled”를 강조하는 문화 덕택인지 각 마케팅, 재무, 그리고 제품 개발 등에 Data Engineer와 Business Analyst를 박아 놓고 알아서 진행하는 분산 모델을 채택한 것으로 알려져 있다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*c9le5O7AYKRfsOPjOrf5nw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*_GxXOrUSDRsRJXJOJykeJg.jpeg" /></figure><p>최근에 나온 제안은 Andrew Ng 교수의 “AI회사로 거듭나는 방법”^[1]이다. 개인적으로 가장 공감하는 글이기도 한데, 그는 AI 시대 이전과 이후의 Data engineer, ML engineer와 Data scientist, 그리고 조직 배치와 운영 방법이 달라져야한다고 말한다. 마치 데이터를 가공하고 응용하고 운영하는 그 방식 자체를 이미 옛날 옛적 호랑이 담배피던 “빅 데이터 시대”로 바라보듯이 …</p><p>필자도 스타트업 기술총괄 역할을 할 때 데이터 팀을 빌딩 해 본 경험이 있는데, 가장 아쉬웠던 점은 애초의 정보 검색, 서비스 품질 향상과 최적화, 조직 내 효율을 위한 데이터 팀 설립 취지와는 달리, 각 부서에서 요구하는 루틴한 데이터 추출 업무라던지, 각 부서의 결과를 있어(?)보이게 만드는 보고 자료를 대신 작업해주는 업무를 하는 기이한 현상을 목격했다.</p><p>각 Business functions에 데이터 기술지원하는 접점에 구성원들 지식 배경이 너무 다르고 언어가 너무 달라 발생하는 문제이기도 했고, 각 부서에서 원래 진행하던 업무 관성 때문이기도 했으며, 구성원 간 묘한 관계 문제이기도 했다. 누구나 불편한 진실은 피하고 싶은 법이다.</p><p>이를 그나마 경영에서 유연하게 해결하는 방법으로 분산 모델이 채택 될 수 있지만, 부서 간 사일로를 형성하게 되고 큰 그림을 놓치는 문제는 피할 수 없다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*HRvw---FpSc5SvmOY4_7Xw.png" /><figcaption>siloed HR :-)</figcaption></figure><p>이 때문에, Andrew Ng의 실전 경험을 바탕으로하는 제안에 격하게 공감할 수 밖에 없다. 내부 고객을 통해 작은 성공을 만들며 신뢰를 쌓아가는 현명함이 필요한 동시에 기업은 어느정도 그들의 독립성을 인정할 필요가 있고, 데이터와 수학적 도구가 개별 성과에 오용될 여지가 없는 기계학습으로 대동 단결하는 방향 말이다.</p><ol><li><a href="https://landing.ai/ai-transformation-playbook/?fbclid=IwAR26MzXiSv5bi2GZ9OLyGtJodtls8fzD5cSva7Cbna4uhxwRSXKVtT--veg">https://landing.ai/ai-transformation-playbook/?fbclid=IwAR26MzXiSv5bi2GZ9OLyGtJodtls8fzD5cSva7Cbna4uhxwRSXKVtT--veg</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d09200b78eca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/spoontech/%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%A4%91%EC%8B%AC-%EB%AC%B8%ED%99%94%EB%A5%BC-%EC%9C%84%ED%95%9C-%ED%8C%80-%EA%B5%AC%EC%B6%95-%EC%A0%84%EB%9E%B5-d09200b78eca">데이터-중심 문화를 위한 팀 구축 전략</a> was originally published in <a href="https://medium.com/spoontech">SpoonLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tacotron2 voice synthesis model explanation & experiments]]></title>
            <link>https://medium.com/@edwardjyoon/tacotron2-voice-synthesis-model-explanation-experiments-8f9ec7d0c8c6?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f9ec7d0c8c6</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Thu, 27 Dec 2018 02:37:16 GMT</pubDate>
            <atom:updated>2018-12-27T02:37:16.596Z</atom:updated>
            <content:encoded><![CDATA[<p>Authors: Edward J. Yoon, Ellie Kang</p><p>The natural language conversation between human and non-human shown by duplex AI at google I/O 18 is considered to have passed the turing test already. Yet, speech recognition technology among multi-speakers has a long way to go. However, deep learning based voice synthesis technology that excels the expected quality of common speech recognition (traditional concatenate synthesizer made voice) seems to be getting closer to us. In this article, we will share our experiments mainly based on Tacotron by DeepMind and Wavenet paper.</p><h3>Mel Spectrogram</h3><p>In Tacotron-2 and related technologies, the term Mel Spectrogram comes into being without missing. Wave values ​​are converted to STFT and stored in a matrix. More precisely, one-dimensional speech signals are two-dimensional markers. It is easy to think that the voice is converted into a photo-like picture.</p><p>This spectrogram is a Mel spectrogram that is compressed according to the Mel curve, which reflects the characteristics of the human cochlea.</p><blockquote>- STFT (Short Time Fourier Transform) = output of extracting spectrum repeatedly at short intervals<br>- spectrogram = time-frequency distribution graph</blockquote><h3>A Review of Tacotron-2 Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*ywJc9C9mVEvGkr52UM35Kg.png" /><figcaption>The model architecture of Tacotron-2 is divided into two major parts</figcaption></figure><h3>1) Spectrogram Prediction Network: Convert character sequences to Mel spectrograms</h3><blockquote>ㅇ ㅏ ㄴ ㄴ ㅕ ㅇ ㅎ ㅏ ㅅ ㅔ 요 → Character Embedding → 3 convolution Layers → Bi-directional LSTM (512 neurons) → encoded features → Attention Unit → LSTM layer (2 uni-directional layers with 1024 neurons) → Linear Transform → Predicted Spectrogram Frame → PostNet (5 Convolutional Layers) → Enhanced Prediction .. and Finally → modified Wavenet</blockquote><h3>2) Modified WaveNet: Conversing Mel Spectrogram to speech</h3><p>This is summarized as follows: <br>Tacotron-made mel-spectrogram + WaveNet - Griffin-Lim = Tacotron 2<br> ㄴ map text sequence to sequence<br> (12.5ms 80 dimensional audio spectrogram → 24khz wave)</p><blockquote>* Griff-Lim Algorithm = first appeared in Tacotron1. An algorithm that predicts discarded phase information by STFT when converted to spectrogram</blockquote><h3>Changes in Speech Technology</h3><p>RNN, LSTM → Tacotron(spectrogram + Grifflin) → Tacotron2 (mel spectrogram+wavenet vocoder)<br>CNN→ wavenet → Parallel wavenet+DCTTS+Deepwave3 → Flowavenet</p><h3>History from Wavenet’s Slow Inference</h3><p>Wavenet is a cnn model that is out of sequential modeling of existing RNN and LSTM. This was to introduce parallelism. Although each time-specific operation was processed in parallel, but it was masked convolution of the autoregressive structure in which the model is still processed sequentially due to the problem of dilated casual convolution. Accordingly, the train speed was fast, but the inference rate was slow.</p><p>To solve this problem, parallel wave net has constructed two training pipelines of student and teacher with IAF (inverse autoregressive flow) structure.</p><p>However, two training pipelines lowered the train speed. To compensate for this, current Flowavenet model that has replaced two training pipelines with one pipeline comes out.</p><p>Other technologies include Google Cloud’s TTS infrastructure and Baidu’s Deep Voice. First, Google Cloud’s Wavenet-based optimized TTS infrastructure is 1000x faster than Wavenet, but related technology is not available now. Also, It would be necessary to use the Wavenet-based Deep Voice open source technology, which is disclosed as a subtitle called Baidu’s Real Time TTS. [2]</p><p>In this way, Wavenet has had the problem that inference processing takes too long. Parallel WaveNet and Flowavenet, which started to solve this problem, are still developing. The world is suggesting the possibility of a new network to catch both fast training speed, fast inference and two rabbits. And many people are actually in research.</p><h3>Korean Hangul Processing</h3><p>In the case of Hangul, one syllable is decomposed into a constant and vowel vowel, so that we think the pronunciation rules may be complicated unlike other languages. For example, there was a concern like this. Because the same consonant ‘ㅁ’ is used as the beginning or the support of pronunciation, would it be able to learn by embedding with all disassembled like the English alphabet?</p><p>Although we are not linguist, it can not be said to be accurate, but the pronunciation rules of Hangul are shown to be composed of at least one consonant and vowel. For example, ‘ㄱ’ constant + ‘ㅏ’ (vowel) + ‘ㄴ’ (constant) = 간, ㅈ(constant) + ㅣ(vowel) = 지. In addition, it was confirmed that Hangul pronunciation rules can be learned in all cases from the actual decomposed sequence.</p><h3>Finishing…</h3><p>So far, we have taken a look at deep-running speech synthesis and speech recognition. Korean audio samples and their comparisons can be found in [3]. We finish this contribution with hope that the experiment and experience we have done will be helpful to someone.</p><ol><li><a href="https://ai.googleblog.com/2018/05/duplex-ai-system-for-natural-conversation.html">https://ai.googleblog.com/2018/05/duplex-ai-system-for-natural-conversation.html</a></li><li><a href="http://research.baidu.com/Blog/index-view?id=91">http://research.baidu.com/Blog/index-view?id=91</a></li><li><a href="https://www.udanax.org/synthesis.html">https://www.udanax.org/synthesis.html</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f9ec7d0c8c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fault-tolerant and Scalable chat service on Spoon Radio]]></title>
            <link>https://medium.com/spoontech/fault-tolerant-and-scalable-chat-service-on-spoon-radio-d3ce93f5c33?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3ce93f5c33</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Wed, 26 Dec 2018 03:00:32 GMT</pubDate>
            <atom:updated>2018-12-26T03:05:56.799Z</atom:updated>
            <content:encoded><![CDATA[<p>Authors: Edward J. Yoon, James Kim, Caley Baek, Ella Kang</p><h3>Abstract</h3><p>Recently we are successfully deployed and released our Chatting application named Heimdallr[1] on Spoon Radio[2] real production infrastructure. Heimdallr is a large-scale chat application server inspired by the LINE+ chatting service architecture and written in Scala language based on Akka’s actor model. In this post, we introduce about how we are serving fault-tolerant and scalable chat service on real production.</p><h3>Problems with Socket.IO</h3><p>The legacy chat application was a single-threaded application, which based on Node.js (and therefore Socket.IO), meaning that it cannot take advantage of multi-core processors. Internally, the rooms and users variable of Socket.IO on the server would only contain the users connected to that particular server instance, as this variable is not shared between instances. So, each separate server instances need a way to communicate and share data like socket.io-redis even though they are on the same single machine. It makes complex communication patterns and difficult to manage a lot of small Node.js processes on multiple servers.</p><p>The new architecture of Heimdallr ChatService consists of a HTTP Server, a ChatRoomActor, and an UserActor based on Actor model of Akka which provides parallel message stream processing. Each ChatRoom and User is sharded at a load balancer level on multiple servers. To synchronize the messages among servers, we used Redis PubSub in a master/slave setup for redundancy.</p><h3>Gradual Migration to Heimdallr</h3><p>Unlike traditional web service application, chat application requires long-live TCP socket communications, therefore non-stop deploy is somewhat tricky. By using single common Redis Pubsub service with legacy chat application, we were able to migrate traffic gradually without stopping online service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-FbIct-mEuClof7PI1v5-g.png" /><figcaption>Live service monitoring with Grafana</figcaption></figure><h3>Dealing With Failure in Heimdallr</h3><p>The actor model of Akka is meant to help you achieve a high level of fault tolerance. One of simple example is high-level server fault. Once supervisor detect the failure of actor, system sends failover message to the clients so that they can try to reconnect another health server.</p><h3>Conclusion</h3><p>Obviously it’s not mature yet and we need to experience more. We’ll continuously engineering and open sourcing the Heimdallr. Keep in touch!</p><ol><li><a href="https://github.com/edwardyoon/Heimdallr">https://github.com/edwardyoon/Heimdallr</a></li><li><a href="https://www.spooncast.net/">https://www.spooncast.net/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3ce93f5c33" width="1" height="1" alt=""><hr><p><a href="https://medium.com/spoontech/fault-tolerant-and-scalable-chat-service-on-spoon-radio-d3ce93f5c33">Fault-tolerant and Scalable chat service on Spoon Radio</a> was originally published in <a href="https://medium.com/spoontech">SpoonLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling to a Millions WebSocket concurrent connections at Spoon Radio]]></title>
            <link>https://medium.com/spoontech/scaling-to-a-millions-websocket-concurrent-connections-at-spoon-radio-63e8a4c7ad54?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/63e8a4c7ad54</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[heimdallr]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[chatting]]></category>
            <category><![CDATA[socketio]]></category>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Mon, 12 Nov 2018 00:52:02 GMT</pubDate>
            <atom:updated>2018-11-12T01:04:25.723Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Authors: Edward J. Yoon, Yeontaek Kim, Kyutaek Oh, Ellie Kang, Caley Baek</em></p><p>We have been working on developing Heimdallr, our chatting platform for Spoon Radio, along with a supporting server-side infrastructure that can handle millions of concurrently connected devices.</p><p>Heimdallr’s infrastructure maintains a persistent socket connection to our cloud, which lets us push out messages to devices in real-time. This brings together all the complexity of handling hundreds of thousands of persistent socket connections server side, managing the connection on the client side as users pass in and out of coverage or switch between networks, and detecting and closing half-open sockets as quickly as possible.</p><p>In this article, we describes how we handle massively concurrent WebSocket connections using Heimdallr on AWS clouds.</p><h3><strong>Busting a myth — 64K ports</strong></h3><p>A TCP Port field is 2x bytes and holds a quantity of 65536. This number limits the amount of addresses a server can have, but does not limit the number of clients to ~64k. Each TCP Packet has two Port fields one for the destination and one for the source (as well as two IP addresses). In Kernel options, several parameters exist to allow for tuning and tweaking of socket-related parameters. In <em>/etc/security/limits.conf</em> file, we have to set the “soft” and “hard” nofile limit to 1000000. Instead of using the “ulimit -n” as some people do we have to, for some reason, specify the “soft” and “hard” limits for both root and all other users separately.</p><pre>* soft nofile 1000000<br>* hard nofile 1000000</pre><p>In <em>/etc/sysctl.conf</em> there are few options we have modified. First is the <em>fs.file-max</em>, the maximum file descriptor limit. The default is quite low so this should be adjusted. Be careful if you are not ready to go super high. Second, we have the socket buffer parameters <em>net.ipv4.tcp_rmem and net.ipv4.tcp_wmem</em>. These are the buffers for reads and writes respectively. Each requires three integer inputs: min, default, and max. These each correspond to the number of bytes that may be buffered for a socket. Set these low with a tolerance max to reduce the amount of ram used for each socket. The relevant portions of our config look like this:</p><pre>fs.file-max = 1000000 // the maximum file handles that can be allocated<br>fs.nr_open = 1000000<br>net.core.somaxconn=1000000<br>net.core.netdev_max_backlog=1000000<br>net.core.rmem_max=16777216<br>net.core.wmem_max=16777216<br>net.nf_conntrack_max=1048576 // if doesn’t work, execute ‘$]modprobe ip_conntrack’ ( on ubuntu )<br>net.ipv4.tcp_wmem = 4096 12582912 16777216<br>net.ipv4.tcp_rmem = 4096 12582912 16777216<br>net.ipv4.ip_forward=1<br>net.ipv4.conf.ens3.forwarding=1<br>net.ipv4.ip_nonlocal_bind = 1<br>net.ipv4.tcp_tw_reuse=1</pre><p>Once the configuration is finished, you have to apply the changes with the following command: <strong><em>‘sysctl -p’</em></strong></p><h3><strong>HAProxy as a WebSocket Load Balancer</strong></h3><p>We use HAProxy as a WebSocket Load Balancer. We tried to use latest Apache 2 with ws_tunnel module for Load Balancing, but it was not good for scaling. First of all, to increase the open file limit of HAProxy processors, we have to set the LimitNOFILE to 100000 or infinity in <em>/etc/systemd/system/multi-user.target.wants/haproxy.service</em> file like below:</p><pre>[Service]<br>LimitNOFILE=1000000<br>…</pre><p>Another big one is a port exhaustion problem. To avoid TCP Port exhaustion problem that causes TCP communications with other machines over the network to fail, we have to use multiple virtual network interfaces.</p><pre>‘sudo ifconfig ens3:1 10.0.11.32 netmask 255.255.255.0 up’, </pre><p>This command bind a intranet address to a virtual network interface ens3:1 whose hardware interface is ens3. This command can be executed several times to add arbitrary number of virtual network interfaces.</p><p>Next, we need to config HAProxy to use these fresh IPs. There is a source command that can be used either in a backend scope or as an argument of server command. This is how HAProxy config file looks like:</p><pre>backend bk_web<br>#log global<br> balance roundrobin<br>server heimdallr1 10.0.1.11:8080 maxconn 100000 weight 10 cookie heimdallr1 check source 10.0.11.32<br>server heimdallr2 10.0.1.12:8080 maxconn 100000 weight 10 cookie heimdallr1 check source 10.0.11.33<br>server heimdallr3 10.0.2.11:8080 maxconn 100000 weight 10 cookie heimdallr1 check source 10.0.11.34<br>server heimdallr4 10.0.2.12:8080 maxconn 100000 weight 10 cookie heimdallr1 check source 10.0.11.35</pre><h3><strong>Concurrency Load Tests with Tsung</strong></h3><p>We use Tsung for WebSocket concurrency load tests. In our tests on AWS 4 nodes Heimdallr cluster, we had check that 100k concurrent connections can be established.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5YD4Zbmy37GtDGknsik1A.png" /></figure><p>Heimdallr is currently open sourced under the Apache License Version 2.0 and is available at <a href="https://github.com/edwardyoon/Heimdallr">https://github.com/edwardyoon/Heimdallr</a> . Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63e8a4c7ad54" width="1" height="1" alt=""><hr><p><a href="https://medium.com/spoontech/scaling-to-a-millions-websocket-concurrent-connections-at-spoon-radio-63e8a4c7ad54">Scaling to a Millions WebSocket concurrent connections at Spoon Radio</a> was originally published in <a href="https://medium.com/spoontech">SpoonLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Text Classification을 위한 Adversarial Training]]></title>
            <link>https://medium.com/@edwardjyoon/text-classification%EC%9D%84-%EC%9C%84%ED%95%9C-adversarial-training-5bc33af84b3?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bc33af84b3</guid>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Wed, 20 Sep 2017 01:33:59 GMT</pubDate>
            <atom:updated>2017-09-20T01:35:05.164Z</atom:updated>
            <content:encoded><![CDATA[<p>흥미롭고 극찬받는 뉴럴 네트워크 모델 중에 GAN 이라는게 있다. discriminator and generator networks 두 개를 가지고 학습하는데, 하나는 더 잘 분류하기 위한 네트워크이고 하나는 더 잘 속이기 위한 네트워크로 이를 동시에 학습하면서 정확도를 높인다.</p><p>이 모델을 텍스트 분류에도 적용해봤다는 논문이 바로 Adversarial Training Methods for Semi-Supervised Text Classification [<a href="https://arxiv.org/abs/1605.07725">link</a>]. 방식은 다음과 같이 LSTM 네트워크 (분류니까 many-to-one) 두 개를 놓는다:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*L43kNy597z-arFnK6T_8dQ.png" /><figcaption>(a) 네트워크는 원래대로 실제 데이터를 학습하고,(b) 네트워크는 속이기 위한 가짜를 생성하는데, 논문 Eq.(2) 수식을 보면 y가 레이블이고 x는 입력이며 r_adv 이 adversarial noise 값이다.</figcaption></figure><p>이 때 adversarial noise 값은 ϵ 보다 작은 범위의 변화이나, 이게 왜 잘 작동할 것 같냐면 원본 텍스트에서 의미는 달라지나 기계가 봤을 땐 거의 똔똔일 것 같은 가짜를 만드는거다. 이걸 보자마자 상당히 가치있는 내용이라는 생각이 들었다. 그 다음으로 semi-supervised learning을 위한 virtual adversarial training이 Eq.(3)(4)(5) 등에 소개되어 있다.</p><p>테스트 데이터는 영화 리뷰 데이터를 사용하였는데 이게 텍스트에 감성이 담겨있어 기계가 해결하기 묘한 데이터라 실험에 적합하다 판단했기 때문이라고 추측한다. 코드나 그런건 Github에 공개되어있진 않다.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bc33af84b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Superscript]]></title>
            <link>https://medium.com/@edwardjyoon/xx-4ca568a5533c?source=rss-58b3a159142c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ca568a5533c</guid>
            <dc:creator><![CDATA[Edward J. Yoon]]></dc:creator>
            <pubDate>Wed, 05 Jul 2017 02:00:25 GMT</pubDate>
            <atom:updated>2017-07-05T09:35:53.449Z</atom:updated>
            <content:encoded><![CDATA[<p>test^[5]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ca568a5533c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>