Commit Graph

425 Commits

Author SHA1 Message Date
Aliaksandr Valialkin a3044a5fd8 Increased small file size threshold in FSHandler - 4-8Kb files are served faster with smallFileReader 2015-12-07 13:55:09 +02:00
Aliaksandr Valialkin 6794c894d9 Properly handle 'big file handler cannot be opened' error 2015-12-07 12:20:26 +02:00
Aliaksandr Valialkin 53d602ef50 Do not take into account data buffered in bufio.Writer when calculating the amount of data sent to the writer 2015-12-07 12:13:19 +02:00
Aliaksandr Valialkin a2ad246047 Fixed a typo 2015-12-07 12:10:22 +02:00
Aliaksandr Valialkin 778f4a1054 An attempt to trigger sendfile path in FSHandler when sending big files 2015-12-07 12:06:39 +02:00
Aliaksandr Valialkin 464f61fb44 FSHandler index page: fixed urls to files 2015-12-07 09:58:01 +02:00
Aliaksandr Valialkin b6349bb92a FSHandler index page: do not wrap file info into a link 2015-12-07 09:54:13 +02:00
Aliaksandr Valialkin 94b8ba2134 FSHandler index page prettifying: added last modification dates, file sizes and directory flags 2015-12-07 09:52:10 +02:00
Aliaksandr Valialkin 330f5581d1 Attempt #2 to add WriteTo to fsFileReader 2015-12-07 09:36:18 +02:00
Aliaksandr Valialkin ad0de104c0 Use New() function in copyBufPool 2015-12-07 09:33:08 +02:00
Aliaksandr Valialkin 6e73ab1b49 Verify index page generation in FSHandler 2015-12-07 09:13:54 +02:00
Aliaksandr Valialkin 60929d176f Code prettifying in fsFileReader.Read 2015-12-07 09:11:54 +02:00
Aliaksandr Valialkin 9441c5f5e3 Do not wrap reader into io.LimitedReader in writeBodyFixedSize - if the reader will return more than the expected bytes, then the error will be returned. This allows io.CopyBuffer() exploiting io.WriterTo interface on the reader, which may result in improved speed for optimized readers 2015-12-07 09:10:48 +02:00
Aliaksandr Valialkin a7e597579f Revert "FSHandler optimization: added WriteTo to fsFileReader. This should speed up io.Copy() from fsFileReader"
This reverts commit 0979f22779.
2015-12-06 20:46:20 +02:00
Aliaksandr Valialkin 0e8987247d Revert "Properly implement fsFileReader.WriteTo for file handlers"
This reverts commit 66029e50a6.
2015-12-06 20:46:18 +02:00
Aliaksandr Valialkin 40921cb7cf Revert "typo fix"
This reverts commit a64d05fc04.
2015-12-06 20:46:11 +02:00
Aliaksandr Valialkin a64d05fc04 typo fix 2015-12-06 20:43:36 +02:00
Aliaksandr Valialkin 66029e50a6 Properly implement fsFileReader.WriteTo for file handlers 2015-12-06 20:42:43 +02:00
Aliaksandr Valialkin 0979f22779 FSHandler optimization: added WriteTo to fsFileReader. This should speed up io.Copy() from fsFileReader 2015-12-06 20:20:46 +02:00
Aliaksandr Valialkin bb1df8cf70 Get updated fasthttp when building fileserver with make 2015-12-06 19:52:44 +02:00
Aliaksandr Valialkin 16828fc733 Prevent possible file handler leak in FSHandler 2015-12-06 19:52:03 +02:00
Aliaksandr Valialkin 9e531e8b5c Added fileserver vs nginx performance comparison 2015-12-04 16:40:24 +02:00
Aliaksandr Valialkin e80eda19e9 Issue #10: Added initial examples 2015-12-04 15:09:12 +02:00
Aliaksandr Valialkin 5099573946 Added missing fsFileReader.ff initialization 2015-12-04 14:49:26 +02:00
Aliaksandr Valialkin 9473129db9 Properly name example function for FSHandler 2015-12-04 14:35:38 +02:00
Aliaksandr Valialkin f2122ef73e Properly close stale file handles if there are pending readers exist 2015-12-04 14:27:49 +02:00
Aliaksandr Valialkin 136ac137fc Fixed a typo 2015-12-04 13:33:16 +02:00
Aliaksandr Valialkin 0f38881a9f Added a link to parent directory in fshandler 2015-12-04 13:30:37 +02:00
Aliaksandr Valialkin 6a748e6e93 Added static files' handler 2015-12-04 13:21:52 +02:00
Aliaksandr Valialkin 0cd9a866a7 Added an example for RequestCtx.Logger 2015-12-04 13:14:38 +02:00
Aliaksandr Valialkin 19078dcdc1 Improved wording 2015-12-04 13:03:55 +02:00
Aliaksandr Valialkin ed1d21e27d Remove '/./' parts from path 2015-12-03 19:00:24 +02:00
Aliaksandr Valialkin fab86ba9b4 Mention TimeoutError exception, which may be called when other goroutines access RequestCtx 2015-12-03 13:42:08 +02:00
Aliaksandr Valialkin 4ac44f0c6c Mention which structs are safe for use from concurrently running goroutines (Server, Client and HostClient) and which structs are unsafe to use from concurrently running goroutines - all the other 2015-12-03 13:38:59 +02:00
Aliaksandr Valialkin ce603344f8 Added build tag to reuseport.go since it includes syscall package (accoding to https://www.youtube.com/watch?v=PAAkCSZUG1c :) ) 2015-12-03 13:11:15 +02:00
Aliaksandr Valialkin 0b6cc4cbad Issue #13: add a (k,v) storage inside RequestCtx for user values, which may pass between middlewares 2015-12-02 20:32:49 +02:00
Aliaksandr Valialkin fe212fe380 Issue #6: Add support for PATCH method and other methods which may contain body 2015-12-02 20:17:50 +02:00
Aliaksandr Valialkin 296de2f908 Added client benchmarks into readme 2015-12-02 19:28:12 +02:00
Aliaksandr Valialkin cc9de9e860 Spelling fixes 2015-12-02 18:58:56 +02:00
Aliaksandr Valialkin 9f9a9e0719 Formatting 2015-12-02 18:55:09 +02:00
Aliaksandr Valialkin c0e66746d8 Fixed spelling typo 2015-12-02 18:50:53 +02:00
Aliaksandr Valialkin 25a28229dc Updated benchmark results in readme 2015-12-02 18:44:19 +02:00
Aliaksandr Valialkin 2c3b85d483 Benchmark server with 10K concurrent clients instead of 1K clients 2015-12-02 18:28:06 +02:00
Aliaksandr Valialkin 48192ad44c Integrated AppendUint perfromance optimization from pull request #2. Thanks to @EricLagergren 2015-12-02 15:01:13 +02:00
Aliaksandr Valialkin 704004d041 Issue #12: added travis build status icon to readme 2015-12-02 14:22:16 +02:00
Aliaksandr Valialkin b0aa8605a7 Issue #12: an attempt to use gox for travis cross-compilation 2015-12-02 14:16:22 +02:00
Aliaksandr Valialkin 9f2b713eff Added quick links to the top of readme 2015-12-02 14:03:26 +02:00
Aliaksandr Valialkin a1d8e1a775 formatting 2015-12-02 13:59:33 +02:00
Aliaksandr Valialkin aea77018ef Added a section with []byte buffer tricks 2015-12-02 13:53:47 +02:00
Aliaksandr Valialkin e823a9af54 Added missing parenthesis 2015-12-02 12:28:33 +02:00