Your SlideShare is downloading. ×
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Perepelitsa
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Perepelitsa

444

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
444
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Современная разработкав Mail.ruНа Perl и не только
  • 2. MythesPerl 5.6 Apache 1CGI?
  • 3. How many serversenough to process100k requestsper secondwith 0.01s delay?Thequestion
  • 4. Users
  • 5. Reademail
  • 6. Andwant
  • 7. Andwantavatars
  • 8. Fromeverywhere
  • 9. Many4Krps
  • 10. Andfast4Krps0.01s
  • 11. FilinIntroduce:Filin4KrpsСервер на C,который отдаетаватарки и иконки
  • 12. Whatthesource?
  • 13. Own…
  • 14. Mail,Fb,Ok,Gravatar,ICQ,…… … …
  • 15. FilinOwndataondisk4Krpsdisk1Krps
  • 16. FilinWheretheothers?4Krps 3Krpsdisk1Krps?
  • 17. FilinCodename“Avatard”4Krps 3KrpsСервис, умеющийискать и отдаватьаватарки. Быстроdisk1Krps
  • 18. IProtoFilinHTTP–Overhead.IProto!4Krps 3Krpsdisk1Krpsstruct packet {uint32_t type,uint32_t length,uint32_t sequence,char[] data}
  • 19. SrvIProtoFilinAvatardinside:theserver4Krps 3Krps
  • 20. SrvSrvIProtoFilinAvatard:servers4Krps 3Krps
  • 21. DBSrvSrvIProtoFilinTakedatafromdatabase4Krps 3Krps
  • 22. MSrvSrvIProtoFilinReplicated4Krps 3Krps S
  • 23. M1SrvSrvS1Mn SnIProtoFilinOfcourse,sharded4Krps 3KrpsTarantool
  • 24. M1SrvSrvQueS1Mn SnIProtoFilinButwheretheyfrom?4Krps 3KrpsTarantoolочередь
  • 25. M1SrvSrvQueS1Mn SnIProtoFilinFromtheinternet)4Krps…3KrpsResTarantool
  • 26. M1SrvSrvQueS1Mn SnIProtoHTTPFilinSvcSomeHTTPRequests4Krps…3Krps3KrpsResTarantool
  • 27. M1SrvSrvQueS1Mn SnIProtoHTTPFilinSvcGotaproblem!4Krps…3Krps3KrpsResTarantool0.01s3s1.5s2.5s
  • 28. Howemailworks?письмо SMTP ServerSMTP Mail.ruХранилищеhttp://e.mail.ruАгент Mail.ruПисьмоилисписок писемКогдаузнаемКогдапоказываем+ аватарки
  • 29. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPFilinSvcMTAImprove!4Krps5Krpsdisk…3Krps3Krps5Krps ResTarantool>>3s
  • 30. M1SrvSrvQueS1Mn SnIProtoIProtoHTTPFilinSvcMTASecondproblem:RAM4Krps5Krps…3Krps3Krps5Krps ResTarantool
  • 31. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPFilinSvcMTARAMisnotrubber.Usedisk4Krps5Krpsdisk…3Krps3Krps5Krps ResTarantoolЗачем хранить в памятинеиспользуемые?
  • 32. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPFilinSvcMTAWelldone!4Krps5Krpsdisk…3Krps3Krps5Krps ResTarantool
  • 33. Language?
  • 34. C?
  • 35. Avoidit
  • 36. Perl!TIMTOWTDI
  • 37. Fast devearly deploy
  • 38. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernlanguage!ResPerl 7!
  • 39. WellknownPerl5.
  • 40. Perl6.O’RLY?
  • 41. Perl7!Now!
  • 42. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernlanguage!ResPerl 7! (5.16)
  • 43. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEvent
  • 44. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server
  • 45. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)
  • 46. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server
  • 47. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server(8k rps/core)
  • 48. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server(8k rps/core)Tarantool
  • 49. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server(8k rps/core)TarantoolHTTP
  • 50. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server(8k rps/core)TarantoolHTTPEV
  • 51. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPModernasyncframefork!ResPerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server(8k rps/core)TarantoolHTTPEVXS
  • 52. SourcesavailablePerl 7!AnyEventIProto::Server(40k rps/core)HTTP::Server(8k rps/core)TarantoolHTTPEVXSgithub.com/Mons/AnyEvent-IProtogithub.com/Mons/AnyEvent-HTTP-Server-IITwiggy,Twisted,Node.js,(but not nginx ;)Faster than
  • 53. Perl 5.6?Perl 5.6!M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPResPerl 7!Apache!Apache?CGI!CGI?
  • 54. Perl5.16vsPerl5.8- Released 11.03.2013- Lower memory usage up to 25%- Lower CPU usage up to 10%- The best Unicode 6 support- Many modern features- Latest libraries- Support for new libraries- No old bugs- New regular expression- Async frameworks- Green threadsPerl 5.16- Released 31.01.2006- Buggy- Obsoleted!Perl 5.8
  • 55. Database?
  • 56. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPNoSQLDatabaseResTarantoolTarantool- High performance- Latest stable- Built in Lua- Multiple indexes- Composite indexes
  • 57. M1SrvSrvQueS1Mn SnswpIProtoIProtoHTTPAndalsoqueueResTarantoolTarantool- High performance- Latest stable- Built in Lua- Multiple indexes- Composite indexes- Lua-based queue
  • 58. How many serversenough to process100k requestsper secondwith 0.01s delay?So,thequestion…
  • 59. Theansweris…
  • 60. Morecorrectanswer;)
  • 61. Profit: effective highloadIProto: 120k rps / serverHTTP: 40k rps / serverFast development – early deploy
  • 62. Profit: effective highload1400%reservation
  • 63. ApplianceHigh performance applicationsUComplex logic with many data sources
  • 64. Mons AndersonР у к о в од и т ел ь отд ел а , П оч т а @ M a i l . r u< m o n s @ c p a n . o r g >< v. p e r e p e l i t s a @ c o r p . m a i l . r u >

×