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
830
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Navigating Team Friction
lara
183
15k
How to train your dragon (web standard)
notwaldorf
88
5.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Fireside Chat
paigeccino
34
3.1k
Into the Great Unknown - MozCon
thekraken
34
1.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.4k
Site-Speed That Sticks
csswizardry
2
190
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
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 ͓͠·͍Ͱ͢