4 ms·
Bitter tale of a serverless experience: Serverless is great until you spend weeks building something in Cloudflare Pages and Workers, then add it to Google and
by ryanjshaw 5y ago
Bitter tale of a serverless experience: Serverless is great until you spend weeks building something in Cloudflare Pages and Workers, then add it to Google and... Google claims your site doesn't exist.
Search Console Live Test gives a vague 'General HTTP Error', Rich Results Test says the 'page is unavailable', Ad Words says 'Destination not working'. Bing indexes your site with no problems, and every device you and your friends own works fine, every uptime tester on the planet says you're good. Cloudflare shows no firewall events and logs are a 'contact us for pricing' Enterprise-only feature.
So what do you do - if Google thinks your serverless site doesn't exist, and you can't debug it because it's all magic? You can't do anything. Back to conventional hosting you go.
- the_duke 5y agoYou can use any external logging service that has an HTTP API. Not ideal, but it works fine. I'm doing this with Cloudflare workers by sending access logs to a self hosted Matomo analytics and error logs to Loggly. But in general, Cloudflare isn't really suitable yet for general app development. They need a lot of additional services for that to become viable, imo.
- ryanjshaw 5y agoAre you thinking of Cloudflare Workers Sites? You can definitely do logging like that with Workers. But my understanding is that Workers Sites have been superseded [1] by Pages, and there are no logs for this new product other than at the Enterprise level. [1] Documentation for Workers Sites at https://workers.cloudflare.com/sites https://workers.cloudflare.com/sites redirects to Pages
- the_duke 5y agoYou can assign regular workers to your sites hosted with Pages. The workers act as a middleware. You can `fetch` the static content and then do any processing/logging you want.
- d4nt 5y agoI've also had the occasional issue with serverless platforms. Not to do with Google indexing, but I had a similar sensation: "well now we're just completely stuck". When something doesn't work the way it should, the whole premise of "you don't have to think about servers" quickly becomes "no, you're not allowed to see the servers" and its horrible. These days I try to make the case at work for targeting containers and using the cloud platforms' container hosting tools instead.