我们需要一个用于静态图像的Web内容加速器,它们位于我们的Apache Web前端服务器之前
我们以前的托管合作伙伴使用Tux取得了巨大的成功,我喜欢它是我们正在使用的Red Hat Linux的一部分,但它的最后一次更新是在2006年,并且似乎未来发展的可能性很小.我们的ISP建议我们在反向缓存代理角色中使用Squid.
Tux和Squid之间的想法?兼容性,可靠性和未来支持对我们而言与性能同等重要.
另外,我在这里阅读其他关于清漆的帖子; 任何人都有与Vquid相比,Varnish的实际经验,和/或Tux,在高流量环境中获得?
干杯
伊恩
更新:我们现在正在测试Squid.使用ab以100的并发率将相同的图像拉出10,000次,Apache本身和Squid/Apache都非常快速地通过请求烧毁.但是Squid只向Apache提出了一个请求,然后从RAM中提供了所有这些请求,而Apache只需要派遣大量工作人员来为图像提供服务.看起来Squid可以很好地释放Apache工作人员来处理动态页面.
我是新手程序员,建立一个我(自然)希望创建大量流量的创业公司.我在dotcloud上托管我的django项目,该项目位于Amazon EC2上.我有一些流媒体(Http,但不是rmtp)所以dotcloud家伙建议我选择CDN.我也使用Amazon S3进行存储,因此决定将Amazon CloudFront作为我的CDN.
现在是我需要将注意力转向缓存的时候了,我迷失了方向.我对这个概念完全陌生.我的知识的整个范围来自我刚刚阅读的教程(http://www.mnot.net/cache_docs/)和一个令人困惑的周末花在咨询谷歌.最令人不安的是,我甚至不确定我需要为我的网站做些什么.
CDN和代理服务器有什么区别?
是否有可能我想使用缓存服务(例如memcached,redis),CDN(CloudFront)和代理服务器(squid)?
我们的站点由数据库驱动,并生成特定于用户位置的动态生成列表.可以缓存这样的网站吗?(列表本身可通过AJAX过滤,因此URL可能保持不变,同时产生大不相同的结果.例如,example.com/some_url/可能会生成40个对象的列表,但只有10个出现在页面上.点击一个过滤器,用户可以在/ some_url /)时最终得到10个不同的对象
高流量,丰富内容网站的最佳做法是什么?
我该如何了解这一点?我看起来到处都似乎理所当然地认为我还没有作为自己基础的一部分的一些基础知识.
我不确定我是在问正确的问题.只是感觉非常迷茫.我现在已经构建了整个网站的95%,并认为我只是在解决细节,但缓存似乎是另一项重大任务.任何指导/建议/鼓励将不胜感激!
我有vps,我想配置我的squid支持HTTPS代理.我已配置http代理并且正常工作,但不支持https.
题
这是我的squid.conf配置细节.
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports …Run Code Online (Sandbox Code Playgroud) 我现在遇到了一个奇怪的问题,即我正在开发的Chrome扩展程序发送http请求(普通的JavaScript).这是一个带有XmlHttpRequest(from )的POST请求,其中包含以下URL:background.js
http://host.com/postform/upload
Run Code Online (Sandbox Code Playgroud)
我也从普通网页(不是chrome扩展名)发送此请求,重要的是,如果我打开开发人员工具并检查我的请求的网络选项卡(选择原始标题显示),我会看到第一个标题:
POST /postform/upload HTTP/1.1
Run Code Online (Sandbox Code Playgroud)
它在我启用代理而不是直接连接之前工作正常.我在我的Ubuntu上使用squid3.使用代理时请求之间只有一个不同之处 - 它使HTTP服务器返回404找不到 - 仅在使用代理时...
当我强制Chrome使用基于squid3的代理时(我在我的Chrome扩展程序中使用PAC脚本),我的请求将无效.我检查了很多次,尽我所能减少请求体的任何差异,而我现在剩下的就是第一个头.
在使用代理激活的请求发送时(从开发人员工具的网络选项卡,从后台页面打开),它看起来像这样:
POST http://host.com/postform/upload HTTP/1.1
Run Code Online (Sandbox Code Playgroud)
我尝试过使用chome.webRequest.onBeforeSendHeaders API,但这没有帮助.我还尝试从XmlHttpRequest.open中的 URL中删除主机名,但这没有帮助.
是的,我在任何情况下都会发送正确的Host和Origin标头.这可能是我的squid3配置中的问题,或者我应该在我的javaScript中更改什么?
UPDATE 现在意识到squid不是问题,问题是POST请求包含FULL uri(http:// ..)而不是"path".GET工作正常.这太痛苦了.
我不能使用iframe变通办法.我的问题是什么?
我在我的Debian服务器上使用squid服务器,我想阻止我的系统中的一些网站,我遵循了所有的程序,但没有结果.
我有一个需要访问Web服务的Java应用程序(不是applet).已经使用JAX-WS生成了Web服务的代理,并且似乎工作正常.在一种情况下,它需要通过Web代理服务器(实际上是Squid 3.0)进行通信,该服务器设置为需要NTLM身份验证.
在Sun的JRE 1.6.0_14上运行,一切都可以正常访问HTTP URL,而无需任何更改:内置的NTLM身份验证器启动,它们都无法正常工作.但是,如果Web服务URL是HTTPS URL,则Web服务调用将在Sun的代码内部失败:
com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.lang.NullPointerException
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:121)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:142)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
... our web service call ...
Caused by: java.lang.NullPointerException
at sun.net.www.protocol.http.NTLMAuthentication.setHeaders(NTLMAuthentication.java:175)
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:1487)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:164)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:109)
... 16 more
Run Code Online (Sandbox Code Playgroud)
查看Sun的bug数据库会在这些类中出现一些例外情况,但所有这些异常似乎都已得到修复.有没有人遇到这样的事情?有人有这个工作吗?
我正在尝试为我正在使用的请求设置代理,HttpClientBuilder如下所示:
CredentialsProvider credsProvider = new BasicCredentialsProvider();
UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(proxyUser, proxyPassword);
credsProvider.setCredentials(new AuthScope(proxyHost, proxyPort), usernamePasswordCredentials);
builder.useSystemProperties();
builder.setProxy(new HttpHost(proxyHost, proxyPort));
builder.setDefaultCredentialsProvider(credsProvider);
builder.setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy());
Run Code Online (Sandbox Code Playgroud)
建造者是:
HttpClientBuilder builder = HttpClientBuilder.create();
Run Code Online (Sandbox Code Playgroud)
但是,当我执行此请求时,我收到此异常:
java.lang.RuntimeException: org.apache.http.conn.UnsupportedSchemeException: http protocol is not supported
Caused by: org.apache.http.conn.UnsupportedSchemeException: http protocol is not supported
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:108) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.conn.BasicHttpClientConnectionManager.connect(BasicHttpClientConnectionManager.java:338) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:388) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) ~[httpclient-4.5.1.jar:4.5.1]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.1.jar:4.5.1]
Run Code Online (Sandbox Code Playgroud)
(简洁缩短除外) …
我有一个非常繁忙的网站(Windows IIS),我想设置一个SQUID反向代理来卸载一些流量.我想知道什么是最佳实践,以及如何在Windows或Unix服务器上进行设置.
我想启用对Squid3服务器上的所有请求的访问,即.应允许通过代理服务器从任何地方到任何地方的请求.
我已经尝试将其添加到配置文件的末尾/etc/squid3/squid.conf:
acl all src 0.0.0.0/0
http_access allow all
Run Code Online (Sandbox Code Playgroud)
我仍然收到TCP_DENIED_REPLY错误:
1490004026.216 0 10.142.224.249 TCP_DENIED_REPLY/403 3546 GET http://www.fb.com/ - HIER_NONE/- text/html
Run Code Online (Sandbox Code Playgroud)
我怎么做这个工作?