ModernWeb
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 從平台、媒體到數據公司:PIXNET 的技術架構演進 - 林瑞男 (Jnlin) {%hackmd j86FNbMoRoeN4Xn0pg5ofw %} 介紹2003-2018的架構改善與進步 Event Code: #5071 問問題由此進 https://app2.sli.do/event/fkuqjlyw ## PIXNET 介紹 ## 架構設計 > Premature optimization is the root of all eval >過早最佳化是萬惡的根源 >[name=Donald Knuth] [恰如其分的MySQL設計](https://speakerdeck.com/yftzeng/qia-ru-qi-fen-de-mysql-she-ji-ji-qiao-modern-web-2016) by ant 大大 PIXNET 因為什麼樣的契機,改善架構,符合需求 ## 每個階段都有適合的架構 * 2003 創立 * 2007 城邦投資 * 2010 轉型,從平台公司轉型到媒體公司 * 很重要的常識 * 在台灣做平台很難 * 2014 媒體公司轉型到數據公司 ## 創業公司的挑戰 * 使用者增加 * 希望有新功能 * 工程師不多 (創辦人自己也是工程師) * 必須省錢: 沒有資金 (3 坪大的雅房擠了 7 個人) ## 因應挑戰: Open Source 萬歲! (in 2004) * lifeType Blog 改寫 * Coppermine Album 改寫 * Apache as Reverse Proxy * DNS Round Robin * 用來做 HA > 好孩子不要學,現在是 2018 我們應該用 2018 的方式 > 應該用 2018 的方式在創業 2003時 aws 還不是aws 只能租機房 買SERVER放進去 ## 2018 的創業公司 * Amazon Web Services * Google Cloud Platform * Microsoft Azure > 雲端很好用就用雲端 #### 要用到什麼時候? 公司規模大到像 google / facebook 用雲端的成本太高,有錢或人去維護 Infra ,就可以從雲端般回自建機房 雲端比較快速,但自建機房成本較低且易於客製化、cost down ## 2007 城邦入股(PIXNET 成為平台公司) 2008 最紅的電影:海角七號 紅到把 PIXNET 的 server 打爆 痞客邦的品牌出現 ## 有資源了,可以買設備了!(in 2008) * Server Load Balancer * MVC Framework * 當時 open source 大部分沒有 MVC 概念 * Monolithic Architecture * 把所有的服務 (部落格、相簿) 通通綁在一起,變成一個單體的服務 * CDN ### 挑戰 * 需要繼續擴張 * 做出差異化 * 無名小站是領導者(當時) * 做得更好、更便宜、想新服務跳脫競爭 * 維持開發速度 * < 10 RDs * 節省成本 靜態資源過 CDN ### Monolithic Architecture * 耦合性高 * 其中一個共用 Component 掛了,Blog、Album都會掛 ## 2010 年 `平台公司`轉型成`媒體公司` 有做到 7 個媒體 (運動、電影、美妝、型男...) ### 嘗試多角化經營(in 2010) 分眾,找 TA * 延伸平台功能 * 找廣告主來投放 * 客製化 * 運動:賽程、比分 * 電影購票 * 認為是多角化經營重要的一塊 * 各種對外串接 * 計分表 * RD 人數擴張 * 10~15 RDs ### 平台到媒體 * 平台 * 標準化服務 * 功能內部開發 * 客戶使用方式多元 * 媒體 * 客製化 * 外部串接、合作 * 有一定套路 * 比賽前後都有相關文章 * 大新聞發生時有相關文章 #### 引發討論平台與媒體的技術是否需要拆分 最後還是單體的網站,但分 team : * 平台一個 team,媒體部分分出來 * 底層共用 Library ### 挑戰 * 團隊開始不了解全局 * 做媒體的做媒體 * 但 business 落差不大 * 有些東西其實可以共用 * 彈性開發流程 * 媒體與平台期待的速度不同 * 平台會做 UI/UX 研究,才開始開發 測試 上線 * 媒體有很多突發事件,像是颱風,需要因應颱風做改善,無法按照原本的開發流程 * 將媒體與平台分開,讓媒體的 team 有較高的主控權 * 維持開發速度 * 10~15 RDs ## 2012 年:應用市集 思考: 把媒體的經營方法拿到平台上面用? 在平台上開放 API 讓不管是內部的 RD 或是外部的 RD 可以透過 plugin 的方式將功能放進平台中 有些功能可以有些功能不行,eg. 金流相關比較困難 顯示方面比較容易,像是因應颱風的修改 ## 2014 年:數據公司 (Big Data) 轉型由虧轉盈 2008 在做單體平台的時候就有意識到數據很重要 使用者行為、log 都有存下來 * 8.1 億篇文章 * 770 萬訪客 * 2800 萬 PageView 太大量不可能在 idc 裡面做,必須 cloud ### 挑戰 * 完全不同 Skill Set 的團隊 * 找了很多資料工程師,資料工程師希望資料已經整理好,比較好分析 * 溝通話術不一樣 * 環境更多元 * Cloud migration * 語言不一樣,之前都用 PHP ,但到了 big data 大部分用 python 或 JAVA * 大量資料的傳輸與處理 * 維持開發速度 👈最重要的一點 * 20~30 RDs (不含 Machine Learning 的工程師) > 很重要所以要講三次 ## 引入 Service Oriented Architecture 不同服務不同型態 ### Service Oriented Architecture 再分拆 * 資料 * PIXInsight * 元件 * 會員 * 動態 * 通知 * 客服 * 產品 * styleMe * 痞客邦 * PIXgoods 通過 API 串接,產品會共用元件,而元件或服務所產生的資料,會再透過 API 丟回給 PIXInsight 做資料分析 ### Service Oriented Architecture * 團隊專注於一件事 * 利用 Cloud 的彈性與運算能力 * 保證 API 的一致性與安全性 * 容錯:Graceful Degradation (優雅降級) * 連環爆炸 * 設計 API 或是取用 API 要可以優雅降級,不會被其他 API 影響 降級服務 ## 沒有完美的架構 * 適合的架構就是完美 * 技術架構是為了要支撐business model * 人員數量是重點 * 不會所有人都知道全局,不能做這種大家都知道全局的假設 * 先從monolithic開始 * 不要為了微服務而服務服務 ## Q&A 1. 為什麼廣告這麼多 Q:數位廣告市場買家還是喜歡侵入式廣告 2. 常常看到黑帽 SEO 使用 Pixnet 發佈假文章(例如假的產品開箱文) 像下面這篇 https://goo.gl/r32aQX 對這點不知道大大抱持什麼想法,是否為此有什麼應對措施? ###### tags: `MW18`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully