While not perfect, Glocks are usually, but not always, very reliable guns.
I have had my old 2nd Gen G21 since the early '90's when they first came out. I have about 50,000 rds through it. In all that time and ammo, the only malfunctions it has ever had were failures to feed with semi wadcutters. However, it is a combat gun, so not feeding semi wadcutters isn't a big deal, except for the fact that I had a bunch of bullets that I couldn't reload.
The other end of the spectrum was my Gen 2.5 G26, also bought when they first came out. Nothing but problems for the first 200 rds or so. Failures to feed, failures to extract, failures to eject, you name it, it did it. After 200 rds, it was like flipping a switch. It straightened out and ran like a Glock should and has run flawlessly ever since. I have about 10,000 through it, no issues at all after the first 200 rds.
When I bought my 1st Gen G17 from the PD I work for a few years ago, it would fail to extract on a regular basis. To be fair, that gun was BEAT! Not a real high round count, but the gun was royally beaten on for it's whole, miserable life as a duty gun for a co that just didn't care about it. I've posted pics before, the rear poly sight was so rounded off that you couldn't use it to aim very well at all because the notch was hogged out and the flat top wasn't flat. A new extractor spring and it was back up and running flawlessly. I also put a new factory poly rear sight on it but really haven't shot it since. This gun is a good example of worn parts, but I thought I would include it to show that, like all guns, Glocks will wear and sometimes require replacement parts.
The late 3rd Gen G19 I bought a few years ago displayed brass to face VERY badly. Several times per magazine, it would bonk me right in the forehead with spent brass. Didn't matter what kind of ammo I shot- range ammo, good hot hollow points, NATO spec ammo, it bonked me in the head regularly. It was so bad that 3-4 times per mag, it would eject to the left! I called Glock and got one of the new ejectors (I can't remember the part number but it was one of the Gen4 ejectors, 30274 maybe) and it went to ejecting properly. Not very energetically, it only throws brass a couple of feet, but it is very regular in that it throws brass to 3:30-4:00 o'clock now.
I have had several others (an old 2nd Gen G23, a brand new Gen4 G22, my G42 and I think there are a few I'm forgetting) that have been perfectly reliable from the day I got them.
Just a few examples to show that, while Glocks are generally good, reliable guns, they aren't perfect.
Bub