Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
mastodonのnodeのはなし
Search
geta6
April 26, 2017
0
2.9k
mastodonのnodeのはなし
geta6
April 26, 2017
Tweet
Share
More Decks by geta6
See All by geta6
pixiv SketchのSSRの話
geta6
10
4k
ReactとFluxのこと
geta6
166
63k
What is CoffeeScript
geta6
8
820
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
How GitHub (no longer) Works
holman
310
140k
Automating Front-end Workflow
addyosmani
1366
200k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Ruby is Unlike a Banana
tanoku
97
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Embracing the Ebb and Flow
colly
84
4.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Music & Morning Musume
bryan
46
6.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Transcript
ͳΜ͔OPEFͷ$16༻͕ ͰுΓ͍ͯͯϚδϠ ό͔ͬͨͷͰͳΜͱ͔ͨ͠
w ໊લɿ͛ͨ w ৬ۀɿҰൠϊʔϚϧΤϯδχΞ w +BWB4DSJQUమ๒ۄͱ͍ͯ͠ΖΜͳϓϩδΣΫτʹಥͬ ࠐ·ΕΔΛ͍ͯ͠·͢ɺීஈQJYJW4LFUDIͰ8FC ͷ࣮Λ͍ͯ͠·͢ HFUB
w ϦϦʔεޙɺ༵ۚͷ࣌͝Ζͷ͜ͱ
w ʮͳΜ͔OPEFͷ$16༻͕ͰுΓ͍ͯͯ ϚδϠό͍ʯ w ʮͳΜ͔λΠϜϥΠϯ͕खΕͯΔͧʯ
w Կͱ͔͠Α͏ɺͬͯݴͬͯԿͱ͔ͨ͠Λ͠·͢
w 8FC4PDLFUΛͬͨ4USFBNJOHؔ࿈ͷ"1*࣮ɺ શͯ̍ϑΝΠϧͷϙΤϜͰ࣮ݱ͞Ε͍ͯΔ w QHTRMίωΫγϣϯϓʔϧɺSFEJTίωΫγϣϯɺIUUQ ΠϯλʔϑΣʔεɺXTΠϯλʔϑΣʔεɺʑ
w OQNTDSJQUΛΑ͘ݟΔͱɺ͜ͷ࣮͕CBCFMOPEF ίϚϯυΛͬͯ&4ίʔυΛىಈ͢Δے ྗӡ༻ํࣜʹͳ͍ͬͯΔ͜ͱ͕Θ͔Δ w ಛʹQNͳͲͷϚωʔδϟʔڬΜͰ͍ͳ͍
w ͱ͜ΖͰOPEFγϯάϧεϨου w ίΞͷҧ͍ͰύϑΥʔϚϯεมΘΒͳ͍
w ݩͷίʔυૉͳ࣮ɺαʔόʔ͋ͨΓϓϩη εɺͭ·ΓίΞ͔͠ར༻Ͱ͖ͳ͍ঢ়ଶͰཱ͔͠ ͯΒΕͳ͍ w $16ෛՙ͕ภͬͨঢ়ଶʹͳΔ
w $16ෛՙ͕ภͬͨঢ়ଶ w ϚετυϯΛಈ͔ͯ͠Δαʔόʔతʹશવେৎ ͳϋζͳͷʹOPEFͷϓϩηε͚͕ͩͰு Γ͍ͯࢮɺͱ͍͏ঢ়ଶͷ͜ͱ w ͭͷίΞΛूதతʹࡴ͠ʹ͔͔Δ
1 3 2 4
w Կ͕ى͖Δ͔ w ϖʔδී௨ʹݟ͑Δͷʹɺͳ͔ͥετϦʔϛϯ ά͕߱ͬͯ͜ͳ͍ w λΠϜϥΠϯ͕ΊͪΌͪ͘ΌΕͯΔ
w Ͳ͏ͬͯղܾ͢Δ͔ w ϓϩηεΛ૿ͯ͠εέδϡʔϦϯά ɺϚγϯ ͷίΞؒͰෛՙΛࢄ͢Δ w ఆੴͱͯ͠QNͳͲͷϓϩηεϚωʔδϟʔΛͬ ͯɺ͍͍ײ͡ʹOPEFͷϓϩηεΛ૿ͯ͋͛͠Δ w
ࡴ͢ྗΛʹͯ͠Δ
1 3 2 4
w खͬऔΓૣ͘QNͰ࣮ݱ͠Α͏ͱͨ͠ w QNͷDPOpHpMFॻ͍ͯྡʹ͍ͨTVEPFSʹͨ͠ w ʮͳΜ͔ಈ͔ͳ͍Μ͚ͩͲʯ
w ϩάΛړͬͨΓ৭ʑͨ͠ΒɺͲ͏ΒTZTUFNEͱ૬ ੑ͕ѱ͘͏·͘ಈ͍͍ͯͳ͍Β͍͜͠ͱ͕Θ͔ͬͨ ʢΓํ͕ѱ͔͔ͬͨ͠Εͳ͍ʣ
w ͏ϦϦʔεͨ͠ޙɺϢʔβʔ͕ࠔͬͯΔͷࠓ w ղܾ͕࠷༏ઌɺ͏ےྗͰղܾ͠Α͏
w ࠷खͬऔΓૣ͘OPEFΛϚϧνίΞʹରԠͤ͞Δ ʹɺDMVTUFSϞδϡʔϧΛ͏ w OPEFʹඪ४Ͱόϯυϧ͞Ε͍ͯΔϞδϡʔϧ w ΫϥελϦϯάػೳΛ࣋ͬͨϓϩηεϚωʔδϟʔ ͷجૅʹͳ͍ͬͯΔ
None
w ಋೖͱͯ؆୯ɺSFRVJSFͯ͠JGจॻ͍ͯϝιου Λݸ࣮ߦ͢Δ͚ͩ
const cluster = require('cluster'); if (cluster.isMaster) { cluster.fork(); } else
{ // your code here }
w ͜ͷ··ͰίΞ͔͑͠ͳ͍ w ίΞ ճɺGPSLΛ࣮ߦ͢ΕΑ͍
const cluster = require('cluster'); const os = require('os'); if (cluster.isMaster)
{ const core = Math.max(os.cpus().length - 1, 1); for (let i = 0; i < core; i++) cluster.fork(); } else { // your code here }
w ͜ΕͰΕͯϚϧνίΞΛશ෦͍͖ΕΔΑ͏ʹͳ Γ·ͨ͠ w ίΞ ͍ͯ͠ΔͷGPSLͨ͠ϓϩηε͕രൃ͠ ͨ࣌ʹϚγϯ͕ਧͬඈͳ͍Α͏ʹ͢ΔͨΊͰ͢
w GPSLݩ͕NBTUFSɺGPSLઌ͕XPSLFS w XPSLFSͷࣄͷׂΓৼΓ04͕উखʹͬͯ͘ Ε·͢ʢϥϯυϩϏϯબͰ͖·͢ʣ
w ʢ͜͜ʹϓϩηεͷෛՙ͕͍͍ײ͡ʹݮ͍ͬͯΔ༷ ࢠ͕ݟͯऔΕΔඒ͍͠άϥϑΛஔ͘ʣ
w *NQSPWFTUSFBNJOH"1*TFSWFSQFSGPSNBODFXJUI DMVTUFS w ຊՈʹऔΓࠐ·Ε·ͨ͠ɺWͰϦϦʔε͞Εͯ ͍·͢ͷͰօ͞Μͥͻ͝ར༻͍ͩ͘͞
None
w تΜͰΒ͑ͯͳʹΑΓ
w ͓·͚ w ͋ͱͭϚʔδ͞Εͨͷ͕͋ΔͷͰհ͠·͢
w "EEIBT.PSFpFMEUPBDDPVOUUJNFMJOFUPCMPDL MBSHFBNPVOUPG9)3
w εΫϩʔϧ͕λΠϜϥΠϯͷඌ౸ୡͨ࣌͠ʹແ ݶʹ9)3ϦΫΤετ͕ΔͷΛ੍ͨ͠
w ͨͿΜ࣮Εɺ3FEVYͷ"DUJPO3FEVDFSʹOFYU VSM͕ଘࡏ͠ͳ͍࣌ͷॲཧΛ͍Εͨ
w "VUPNBUJDBMMZDIBOHFUIFTJ[FPGUFYUBSFB
w ͍จষΛೖྗͨ࣌͠ʹɺUPPU͢Δ࣌ͷUFYUBSFBͷ αΠζ͕ࣗಈతʹมΘΔΑ͏ʹͨ͠ w UFYUBSFBͷBVUPSFTJ[F؆୯ɺߦͰ࣮ݱͰ͖Δ
onChange (e) { e.target.style.height = 'auto'; e.target.style.height = `${e.target.scrollHeight}px`; },
onChange (e) { e.target.style.height = 'auto'; e.target.style.height = `${e.target.scrollHeight}px`; },
ߦΛݮΒ࣌͢ͷॲཧ ☝ߦΛ૿࣌͢ͷॲཧ
w ͓͠·͍Ͱ͢