<p>Can anyone recommend me books/articles about writing horizontally scalable servers in GO? Thanks.</p>
<hr/>**评论:**<br/><br/>k_u_r_o_k_u_s_e: <pre><blockquote>
<p>Can anyone recommend me books/articles about writing horizontally scalable servers in GO? Thanks.</p>
</blockquote>
<p>no need for books. if your server is immutable it will scale horizontally. It you persist states and data it will not. It has nothing to do with Go specifically.</p></pre>PavleKreator: <pre><blockquote>
<p>if your server is immutable it will scale horizontally. It you persist states and data it will not</p>
</blockquote>
<p>Thanks, if this is the case how would I make a server that:</p>
<ol>
<li>Processes the data from the database all the time and updates the database</li>
<li>Serves data to a client</li>
</ol>
<p>Should I just separate the two, because I think that only the second part will need to be scalable?</p></pre>kions: <pre><ol>
<li><p>If you are only concerned about horizontally scaling the Go app then you would have identical servers running the Go app. Then you have a server that runs the database. In the Go app configs you provide the ip of the database server as the database host.</p></li>
<li><p>You would need a Load Balancer, which is a server that distributes your client traffic across the available Go servers. The Go server server will either grab the data from the database and return it to the client or post data from the client to the database.</p></li>
</ol>
<p>Your questions are more related to system admin and devops than Go, so I would recommend looking for topics and forums related to that.</p>
<p>You can also play around with setting up servers for free with AWS <a href="https://aws.amazon.com/free" rel="nofollow">https://aws.amazon.com/free</a> and read their tutorials <a href="https://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/gsg-aws-tutorials.html" rel="nofollow">https://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/gsg-aws-tutorials.html</a> . Just be aware that they got plenty of custom services that can add confusion. If you plan on using another hosting company stick with building an architecture with just EC2, which in simple terms is a server you manage.</p></pre>acidProtestCarnival: <pre><p>I don't get it, that's pretty much exactly what I said and got downvoted. Bizarre.</p></pre>k_u_r_o_k_u_s_e: <pre><p>I guess some people don't get what stateless means, but ignore the downvotes really, they don't mean anything.</p></pre>acidProtestCarnival: <pre><p>I think generally you can follow the golden rule that scalable microservices should be, themselves, stateless.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传